Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

能否参考隔壁FFM-Mojo-WebQQ 的方式对[图片]进行处理显示? #208

Closed
if1y opened this issue Mar 25, 2018 · 1 comment
Closed
Labels

Comments

@if1y
Copy link

if1y commented Mar 25, 2018

No description provided.

@tusooa tusooa added the wontfix label Mar 25, 2018
@tusooa
Copy link
Collaborator

tusooa commented Mar 25, 2018

在它的代码里搜索了一下,其策略是「消息为空时返回[图片]」。
Webqq 本身并不支持图片。只是一条讯息中如果只有图片,它还是会被接收,内容为空。
这样并没有考虑一条消息中图文并存的情况。况且,我们并不能够保证内容为空的讯息一定就是图片。若这样处理,可能会使得一些用户困惑,以为Webqq开始支持图片(或者至少能知道讯息中某位置出现了图片)了。
您可以考虑在代码中添加这么一段来模拟这个效果。

$client->on(receive_message => sub
{
    my (undef, $msg) = @_;
    $msg->{content} = '[图片]' if ! length $msg->{content};
});

@tusooa tusooa closed this as completed Mar 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants