Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

退出登录时会收到退出前接收到消息的撤回通知(实际没有被撤回) #155

Closed
Tracked by #19
su-chang opened this issue Feb 9, 2022 · 2 comments
Assignees

Comments

@su-chang
Copy link
Member

su-chang commented Feb 9, 2022

日志

21:20:42 SILL PuppetWhatsApp onMessageCreate({"id":{"fromMe":true,"remote":"120363037070043803@g.us","id":"3A189B4A8CE90205FB1D","_serialized":"true_120363037070043803@g.us_3A189B4A8CE90205FB1D"},"ack":0,"hasMedia":false,"body":"logout","type":"chat","timestamp":1644412842,"from":"8613126768525@c.us","to":"120363037070043803@g.us","deviceType":"ios","isForwarded":false,"forwardingScore":0,"isStatus":false,"isStarred":false,"fromMe":true,"hasQuotedMsg":false,"vCards":[],"mentionedIds":[],"isGif":false,"isEphemeral":false,"links":[]})
21:20:42 INFO PuppetWhatsApp onMessage({"messageId":"3A189B4A8CE90205FB1D"})
21:20:42 VERB Puppet messagePayload(3A189B4A8CE90205FB1D)
21:20:42 SILL Puppet messagePayloadCache(3A189B4A8CE90205FB1D) cache MISS
21:20:42 INFO PuppetWhatsApp messageRawPayload(3A189B4A8CE90205FB1D)
21:20:42 SILL Puppet messagePayload(3A189B4A8CE90205FB1D) cache SET

  =========================================
  Message type: 7
  text: logout
  from: 8613126768525@c.us
  to: undefined
  room: 120363037070043803@g.us
  =========================================
  
21:20:42 SILL PuppetWhatsApp onChangeState("OPENING")
21:20:42 SILL PuppetWhatsApp onMessageRevokeMe({"id":{"fromMe":true,"remote":"120363037070043803@g.us","id":"3A189B4A8CE90205FB1D","_serialized":"true_120363037070043803@g.us_3A189B4A8CE90205FB1D"},"ack":0,"hasMedia":false,"body":"logout","type":"chat","timestamp":1644412842,"from":"8613126768525@c.us","to":"120363037070043803@g.us","deviceType":"ios","isForwarded":false,"forwardingScore":0,"isStatus":false,"isStarred":false,"fromMe":true,"hasQuotedMsg":false,"vCards":[],"mentionedIds":[],"isGif":false,"isEphemeral":false,"links":[]})
21:20:42 INFO PuppetWhatsApp onMessage({"messageId":"3A189B4A8CE90205FB1D_revoked"})
21:20:42 VERB Puppet messagePayload(3A189B4A8CE90205FB1D_revoked)
21:20:42 SILL Puppet messagePayloadCache(3A189B4A8CE90205FB1D_revoked) cache MISS
21:20:42 INFO PuppetWhatsApp messageRawPayload(3A189B4A8CE90205FB1D_revoked)
21:20:42 SILL Puppet messagePayload(3A189B4A8CE90205FB1D_revoked) cache SET

  =========================================
  Message type: 13
  text: 3A189B4A8CE90205FB1D
  from: 8613126768525@c.us
  to: undefined
  room: 120363037070043803@g.us
  =========================================
  
21:20:42 SILL PuppetWhatsApp onChangeState(null)
21:20:42 INFO PuppetWhatsApp initWhatsAppEvents: "disconnected", value: null
21:20:42 INFO PuppetWhatsApp onLogout(已退出登录)
21:20:42 VERB MemoryCard <> delete(PUPPET_WHATSAPP)
21:20:42 VERB MemoryCard <session-file> save() to StorageFile</Users/suchang/Desktop/PROJECT/company-project/wechaty-related-project/puppet-whatsapp/session-file.memory-card.json>
21:20:42 VERB StorageFile save() to /Users/suchang/Desktop/PROJECT/company-project/wechaty-related-project/puppet-whatsapp/session-file.memory-card.json
21:20:42 INFO PuppetWhatsApp onLogout(8613126768525@c.us, 已退出登录)
21:20:42 INFO PuppetWhatsApp LOGOUT, 8613126768525@c.us
@su-chang
Copy link
Member Author

su-chang commented Feb 9, 2022

21:30:43 SILL PuppetWhatsApp onMessageCreate({"id":{"fromMe":true,"remote":"120363037070043803@g.us","id":"3AAAC9213028C269E3B7","_serialized":"true_120363037070043803@g.us_3AAAC9213028C269E3B7"},"ack":1,"hasMedia":false,"body":"logout","type":"chat","timestamp":1644413442,"from":"8613126768525@c.us","to":"120363037070043803@g.us","deviceType":"ios","isForwarded":false,"forwardingScore":0,"isStatus":false,"isStarred":false,"fromMe":true,"hasQuotedMsg":false,"vCards":[],"mentionedIds":[],"isGif":false,"isEphemeral":false,"links":[]})
21:30:43 VERB FlashStore get(3AAAC9213028C269E3B7)
21:30:43 VERB FlashStore set(3AAAC9213028C269E3B7, [object Object]) value type: object
21:30:43 INFO PuppetWhatsApp onMessage({"messageId":"3AAAC9213028C269E3B7"})
21:30:43 VERB Puppet messagePayload(3AAAC9213028C269E3B7)
21:30:43 SILL Puppet messagePayloadCache(3AAAC9213028C269E3B7) cache MISS
21:30:43 INFO PuppetWhatsApp messageRawPayload(3AAAC9213028C269E3B7)
21:30:43 VERB FlashStore get(3AAAC9213028C269E3B7)
21:30:43 SILL Puppet messagePayload(3AAAC9213028C269E3B7) cache SET

  =========================================
  Message type: 7
  text: logout
  from: 8613126768525@c.us
  to: undefined
  room: 120363037070043803@g.us
  =========================================
  
21:30:43 SILL PuppetWhatsApp onChangeState("OPENING")
21:30:43 SILL PuppetWhatsApp onMessageRevokeMe({"id":{"fromMe":false,"remote":"120363037070043803@g.us","id":"3AB60580C36CB2BDEC34","participant":"8613810195807@c.us","_serialized":"false_120363037070043803@g.us_3AB60580C36CB2BDEC34_8613810195807@c.us"},"ack":0,"hasMedia":false,"body":"","type":"gp2","timestamp":1644413423,"from":"120363037070043803@g.us","to":"8613126768525@c.us","author":"8613351873428@c.us","deviceType":"ios","isForwarded":false,"forwardingScore":0,"isStatus":false,"isStarred":false,"broadcast":false,"fromMe":false,"hasQuotedMsg":false,"vCards":[],"mentionedIds":[],"isGif":false,"isEphemeral":false,"links":[]})
21:30:43 VERB FlashStore set(3AB60580C36CB2BDEC34_revoked, [object Object]) value type: object
21:30:43 INFO PuppetWhatsApp onMessage({"messageId":"3AB60580C36CB2BDEC34_revoked"})
21:30:43 VERB Puppet messagePayload(3AB60580C36CB2BDEC34_revoked)
21:30:43 SILL Puppet messagePayloadCache(3AB60580C36CB2BDEC34_revoked) cache MISS
21:30:43 INFO PuppetWhatsApp messageRawPayload(3AB60580C36CB2BDEC34_revoked)
21:30:43 VERB FlashStore get(3AB60580C36CB2BDEC34_revoked)
21:30:43 SILL Puppet messagePayload(3AB60580C36CB2BDEC34_revoked) cache SET

  =========================================
  Message type: 13
  text: 3AB60580C36CB2BDEC34
  from: 8613351873428@c.us
  to: undefined
  room: 120363037070043803@g.us
  =========================================
  
21:30:43 SILL PuppetWhatsApp onChangeState(null)
21:30:43 INFO PuppetWhatsApp initWhatsAppEvents: "disconnected", value: null
21:30:43 INFO PuppetWhatsApp onLogout(已退出登录)
21:30:43 VERB MemoryCard <> delete(PUPPET_WHATSAPP)

This was referenced Feb 9, 2022
@su-chang su-chang closed this as completed Feb 9, 2022
@bung87 bung87 reopened this Feb 10, 2022
@su-chang
Copy link
Member Author

退出登录时收到已发送消息的onMessageRevokeMe事件

11: 50: 04 SILL PuppetWhatsApp onMessageRevokeMe({
  "id": {
    "fromMe": true,
    "remote": "8613351873428@c.us",
    "id": "3A9106F57666BBBBAD20",
    "_serialized": "true_8613351873428@c.us_3A9106F57666BBBBAD20"
  },
  "ack": 2,
  "hasMedia": false,
  "body": "789",
  "type": "chat",
  "timestamp": 1644464995,
  "from": "8613126768525@c.us",
  "to": "8613351873428@c.us",
  "deviceType": "ios",
  "isForwarded": false,
  "forwardingScore": 0,
  "isStatus": false,
  "isStarred": false,
  "fromMe": true,
  "hasQuotedMsg": false,
  "vCards": [],
  "mentionedIds": [],
  "isGif": false,
  "isEphemeral": false,
  "links": []
})
11: 50: 04 VERB FlashStore set(3 A9106F57666BBBBAD20_revoked, [object Object]) value type: object
11: 50: 04 SILL PuppetWhatsApp onMessageRevokeMe({
  "id": {
    "fromMe": true,
    "remote": "8613351873428@c.us",
    "id": "3AF3A34232E5806EAA7C",
    "_serialized": "true_8613351873428@c.us_3AF3A34232E5806EAA7C"
  },
  "ack": 0,
  "hasMedia": false,
  "body": "logout",
  "type": "chat",
  "timestamp": 1644465003,
  "from": "8613126768525@c.us",
  "to": "8613351873428@c.us",
  "deviceType": "ios",
  "isForwarded": false,
  "forwardingScore": 0,
  "isStatus": false,
  "isStarred": false,
  "fromMe": true,
  "hasQuotedMsg": false,
  "vCards": [],
  "mentionedIds": [],
  "isGif": false,
  "isEphemeral": false,
  "links": []
})

在bot手机端删除消息

11: 52: 32 SILL PuppetWhatsApp onMessageRevokeMe({
  "id": {
    "fromMe": true,
    "remote": "8613351873428@c.us",
    "id": "3AED303BC70AD7A8CD89",
    "_serialized": "true_8613351873428@c.us_3AED303BC70AD7A8CD89"
  },
  "ack": 2,
  "hasMedia": false,
  "body": "458",
  "type": "chat",
  "timestamp": 1644465144,
  "from": "8613126768525@c.us",
  "to": "8613351873428@c.us",
  "deviceType": "ios",
  "isForwarded": false,
  "forwardingScore": 0,
  "isStatus": false,
  "isStarred": false,
  "fromMe": true,
  "hasQuotedMsg": false,
  "vCards": [],
  "mentionedIds": [],
  "isGif": false,
  "isEphemeral": false,
  "links": []
})

结论
whatsapp-web 存在bug,在退出登录时会接收到自己发送过的消息的撤回事件,目前无法区分这两种情况。暂时不将手机端删除消息(非撤回)作为撤回消息。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants