From 90559a6bcfec430f781908698935de4fb7028b99 Mon Sep 17 00:00:00 2001 From: fabian4 Date: Thu, 31 Mar 2022 15:41:33 +0800 Subject: [PATCH] fix: https://github.com/wechaty/puppet/issues/187 --- src/puppet-walnut.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/puppet-walnut.ts b/src/puppet-walnut.ts index dbef760..c54ff51 100644 --- a/src/puppet-walnut.ts +++ b/src/puppet-walnut.ts @@ -181,11 +181,11 @@ class PuppetWalnut extends PUPPET.Puppet { */ override async messageRawPayloadParser (rawPayload: WalnutMessagePayload): Promise { const res = { - fromId: rawPayload.senderAddress.replace('tel:+86', ''), id: rawPayload.messageId, + listenerId: rawPayload.destinationAddress, + talkerId: rawPayload.senderAddress.replace('tel:+86', ''), text: rawPayload.messageList[0]!.contentText.toString(), timestamp: Date.parse(rawPayload.dateTime), - toId: rawPayload.destinationAddress, type: PUPPET.types.Message.Text, } const file = rawPayload.messageList[0]?.contentText[0] as FileItem