-
Notifications
You must be signed in to change notification settings - Fork 1
Description
When we are using plugin with HAWechaty, we will register the plugin to all the underlying Wechaty instances:
Which means that, all the available plugin will react to the messages, lead to the below issue
The above issue is because the Wechaty Chatopera Plugin will use the message.say()
to send back the message, and when we have two Wechaty instances in HA, the message will be processed twice.
await message.say(answer)
We need to figure out a way to deal with this situation and make it the best practice.
Deduplication
One message will be received by more than one bot with HA Wechaty, which means it will be emitted many times. However, we only want HA Wechaty to emit one message for one message, not many.
陈明雨: 我应该可以,一会我修改下文档~ (2021-10-14 15:10:44)
陈明雨: 我应该可以,一会我修改下文档~ (2021-10-14 15:10:44)
陈明雨: 我应该可以,一会我修改下文档~ (2021-10-14 15:10:44)
Huan (李卓桓): [Fireworks] 大家晚上见! (2021-10-14 15:24:12)
Huan (李卓桓): [烟花] 大家晚上见! (2021-10-14 15:24:13)
Huan (李卓桓): [烟花] 大家晚上见! (2021-10-14 15:24:13)
Even the text message will not match each other when the bot is using different puppet protocols:
Huan (李卓桓): [Fireworks] 大家晚上见! (2021-10-14 15:24:12)
Huan (李卓桓): [烟花] 大家晚上见! (2021-10-14 15:24:13)