Closed su-chang closed 2 years ago
We can not receive message event for which send by bot self from other WhatsApp client. But we can receive message-create event.
message
message-create
So just need remove this condition: message.to === this.getBotId()
message.to === this.getBotId()
if (message.id.fromMe && message.to === this.getBotId()) { const messageId = message.id.id const cacheManager = await this.manager.getCacheManager() await cacheManager.setMessageRawPayload(messageId, message) this.emit('message', { messageId }) }
if (message.id.fromMe) { const messageId = message.id.id const cacheManager = await this.manager.getCacheManager() await cacheManager.setMessageRawPayload(messageId, message) this.emit('message', { messageId }) }
It will be resolved after puppet-whatsapp@1.19.1.
puppet-whatsapp@1.19.1
We can not receive
message
event for which send by bot self from other WhatsApp client. But we can receivemessage-create
event.So just need remove this condition:
message.to === this.getBotId()