Closed gadflysu closed 5 years ago
I have never seen this strange gif, but I can't send to wechat any graphics with an alpha channel including messages of stickers
type, image or file inpng
or gif
format.
I wrote a middleware to convert those graphics to jpeg
image. It worked for my case. Hope it could help you out.
Thank you for the report.
This issue is seen from non-EWS Web WeChat users as well, as this is a server-side error, there is no way that we can completely fix this issue. I will try to include a workaround regarding this when I have time.
Workaround released at version 2.0.0a20.
Workaround released at version 2.0.0a20.
@blueset According to #56, version 2.0.0a20 still has some bugs.
Workaround released at version 2.0.0a20.
不清楚是由于之前安装过中间件的原因还是新的机制如此,a22版本的贴纸是图片形式发送的,且GIF无法正常发出,bot也不提示错误。已移除中间件,但效果仍与中间件一致 @blueset
不清楚是由于之前安装过中间件的原因还是新的机制如此,a22版本的贴纸是图片形式发送的,且GIF无法正常发出,bot也不提示错误。已移除中间件,但效果仍与中间件一致
预期行为。微信网页版中发送 GIF 的部分无法正常工作,所以该更新增加了 send_stickers_and_gif_as_jpeg
开关作为应急方案。所有贴纸和 GIF 图片均以 JPEG 形式发送,并丢弃 Alpha 通道、且仅保留第一帧。
参见说明文件中关于 send_stickers_and_gif_as_jpeg
的段落。
根据用户汇报以及实际测试,以上服务器端的问题均已恢复。将于下一版本设置 send_stickers_and_gif_as_jpeg
的默认值变更为 false
。
根据用户汇报以及实际测试,以上服务器端的问题均已恢复。将于下一版本设置
send_stickers_and_gif_as_jpeg
的默认值变更为false
。
TG里面新出的动态表情不能发送,不知能否以GIF的形式发送出去 @blueset
Version Info
Note that the issue can also be reproduced after I updated the packages to the latest version (showed below) from GitHub and started EFB with the same configuration but empty data in my
default
profile.Issue Description
When I send stickers (WebP) or GIFs from ETM to EWS, EWS converts them to the same strange GIF that I've never seen before. There was another report saying the same condition.
[Update#1] It is puzzling that the GIF can be seen on my WeChat mobile client, but cannot be seen by my friend in a WeChat group.
[Update#2] Sometimes EFB didn't forward stickers in some conversations other than where this issue occurred. In other words, EWS either sends the strange GIF or doesn't send stickers or GIFs received from ETM.
Steps to Reproduce
Start EFB with ETM & EWS enabled, then send stickers from Telegram.
Verbose Log
Verbose Log
``` 2019-05-02 21:06:31,210 [DEBUG]: telegram.ext.dispatcher (dispatcher.start; dispatcher.py:227) Processing Update: {'update_id': 585****43, 'message': {'message_id': 6****7, 'date': 1556802391, 'chat': {'id': -222****38, 'type': 'group', 'title': 'WeChat@****', 'all_members_are_administrators': True}, 'entities': [], 'caption_entities': [], 'photo': [], 'sticker': {'file_id': 'CAADBAADcwwAAsdkLwXi0WOr_Vn4mAI', 'width': 512, 'height': 463, 'thumb': {'file_id': 'AAQEABP2q2QZAASuhtDcG89B9tAmAAIC', 'width': 128, 'height': 116, 'file_size': 4638}, 'emoji': '😏', 'file_size': 20874, 'set_name': 'MunikoSH'}, 'new_chat_members': [], 'new_chat_photo': [], 'delete_chat_photo': False, 'group_chat_created': False, 'supergroup_chat_created': False, 'channel_chat_created': False, 'from': {'id': 55******1, 'first_name': 'sudo', 'is_bot': False, 'language_code': 'en'}}} 2019-05-02 21:06:31,210 [DEBUG]: efb_telegram_master.locale_handler (locale_handler.check_update; locale_handler.py:36) [585****43] Update has language en. 2019-05-02 21:06:31,210 [DEBUG]: efb_telegram_master.master_message (master_message.msg; master_message.py:89) Received message from Telegram: {'message_id': 6****7, 'date': 1556802391, 'chat': {'id': -222****38, 'type': 'group', 'title': 'WeChat@****', 'all_members_are_administrators': True}, 'entities': [], 'caption_entities': [], 'photo': [], 'sticker': {'file_id': 'CAADBAADcwwAAsdkLwXi0WOr_Vn4mAI', 'width': 512, 'height': 463, 'thumb': {'file_id': 'AAQEABP2q2QZAASuhtDcG89B9tAmAAIC', 'width': 128, 'height': 116, 'file_size': 4638}, 'emoji': '😏', 'file_size': 20874, 'set_name': 'MunikoSH'}, 'new_chat_members': [], 'new_chat_photo': [], 'delete_chat_photo': False, 'group_chat_created': False, 'supergroup_chat_created': False, 'channel_chat_created': False, 'from': {'id': 55******1, 'first_name': 'sudo', 'is_bot': False, 'language_code': 'en'}} 2019-05-02 21:06:31,211 [DEBUG]: peewee (peewee.execute_sql; peewee.py:2671) ('SELECT "t1"."id", "t1"."master_uid", "t1"."slave_uid" FROM "chatassoc" AS "t1" WHERE ("t1"."master_uid" = ?)', ['blueset.telegram -222****38']) 2019-05-02 21:06:31,211 [DEBUG]: efb_telegram_master.master_message (master_message.process_telegram_message; master_message.py:147) [-222****38.6****7] Message is edited: False, None 2019-05-02 21:06:31,212 [DEBUG]: peewee (peewee.execute_sql; peewee.py:2671) ('SELECT "t1"."id", "t1"."master_uid", "t1"."slave_uid" FROM "chatassoc" AS "t1" WHERE ("t1"."master_uid" = ?)', ['blueset.telegram -222****38']) 2019-05-02 21:06:31,212 [DEBUG]: efb_telegram_master.master_message (master_message.process_telegram_message; master_message.py:223) [-222****38.6****7] Telegram received. From private chat: False; Group has multiple linked chats: False; Message replied to another message: False 2019-05-02 21:06:31,212 [DEBUG]: efb_telegram_master.master_message (master_message.process_telegram_message; master_message.py:224) [-222****38.6****7] Destination chat = blueset.wechat 8d*****4 2019-05-02 21:06:31,213 [DEBUG]: peewee (peewee.execute_sql; peewee.py:2671) ('SELECT "t1"."id", "t1"."slave_channel_id", "t1"."slave_channel_emoji", "t1"."slave_chat_uid", "t1"."slave_chat_name", "t1"."slave_chat_alias", "t1"."slave_chat_type" FROM "slavechatinfo" AS "t1" WHERE (("t1"."slave_channel_id" = ?) AND ("t1"."slave_chat_uid" = ?)) LIMIT ?', ['blueset.wechat', '8d*****4', 1]) 2019-05-02 21:06:31,213 [DEBUG]: efb_telegram_master.master_message (master_message.process_telegram_message; master_message.py:266) [-222****38.6****7] Message type from Telegram: Sticker 2019-05-02 21:06:31,213 [DEBUG]: efb_telegram_master.master_message (master_message.process_telegram_message; master_message.py:270) [-222****38.6****7] EFB message type: Sticker 2019-05-02 21:06:31,640 [DEBUG]: efb_telegram_master.master_message (master_message.process_telegram_message; master_message.py:322) [-222****38.6****7] Trying to convert WebP sticker (/tmp/tmp2wcvdvs1.webp) to PNG. 2019-05-02 21:06:31,699 [DEBUG]: efb_telegram_master.master_message (master_message.process_telegram_message; master_message.py:327) [-222****38.6****7] WebP sticker is converted to PNG (/tmp/tmp_8e_brlh.png). 2019-05-02 21:06:31,727 [INFO]: plugins.blueset.wechat.WeChatChannel (__init__.send_message; __init__.py:321) [-222****38.6****7] Sending message to WeChat: uid: 8d*****4 UserName: @@93************92 NickName: **** Type: MsgType.Sticker Text: 2019-05-02 21:06:31,728 [DEBUG]: efb_wechat_slave.wxpy.api.chats.chat (chat.mark_as_read; chat.py:291) markingOf course,
file_id
s are different as expected when I send different stickers.