Open QieSen opened 1 year ago
I like the idea. However, unfortunately, EWS did not implement get_message_by_id()
due to the corresponding API from Web WC not made available to us. This means that we have no way to download the message again by ID. If we are to implement the feature, we would need to store all images locally, which could increase the demand of the users’ storage space.
Please let me know if you have any idea to workaround this.
我喜欢这个想法。但遗憾的是 EWS 没有实现 get_message_by_id()
这个方法。因为网页版 WC 没有暴露的相应接口出来,EWS 没有办法按照消息 ID 重新下载消息。如果要实现这个功能,EWS 可能需要在本地存储所有的图片,且会增加用户存储空间的需求。
如果您有其他更好的办法,欢迎留言讨论。
Thanks for your answer. After testing with Web WC, I found that even if the cache is disabled, the pictures can be downloaded repeatedly in quite a long time.
Besides, both reply /rm
and delete_on_edit
feature can make EWS locate a message then revoke it. Is there any way of modifying them to locate the picture and re-download it?
感谢你的解答。 我发现在网页版微信中,即使禁用缓存,很长一段时间内聊天中的图片仍然可以反复下载。
另外,既然ETM的/rm
撤回和EWS的delete_on_edit
特性都可以让EWS定位到对应的历史消息,或许对撤回功能加以修改就能够实现定位并重新下载图片?
以上是我的一些看法,由于我对于代码层面的理解很浅显,如有错误请指出。
When the flag
send_image_as_file
is false, users reply to an incoming photo message with/resent
command, ETM will reply to the selected message (Easy to trace back), then resent that photo as a file to the session. Or return an error if the message id got invalid due to EWS session refresh.When the flag is true, ETM should ignore the
/resent
command, or return a error.当ETM属性
send_image_as_file
为false时响应/resent
指令,用户发送指令回复一条bot转发的图片消息,ETM会引用该消息(方便回溯定位)并将该图片以文件形式重新发到会话中。若EWS会话刷新导致该消息id失效则返回报错。 若上述ETM属性为true则不响应/resent
命令或返回错误。