wechaty/puppet-whatsapp

消息id中的_serialized异常

Open

#213 opened on Feb 16, 2022

View on GitHub
 (0 comments) (0 reactions) (0 assignees)TypeScript (23 forks)github user discovery
help wantedquestion

Repository metrics

Stars
 (26 stars)
PR merge metrics
 (PR metrics pending)

Description

message.id._serialized 总是以 true_ 开头,现在遇到一种情况是以 false_ 开头的,需要明确该消息的区别点:

该消息的 ack0,但是该消息是由其他人发送给 bot 的,应该不会存在 ack: 0 的状态。

{
  "mediaKey": "cQWDFFa9Bw79WIdqyCwjeer9ACczi6VItT35/go+mjY=",
  "id": {
    "fromMe": false,
    "remote": "8618500946096@c.us",
    "id": "1FD65D39B65C521339FEB44D6BC0E731",
    "_serialized": "false_8618500946096@c.us_1FD65D39B65C521339FEB44D6BC0E731"
  },
  "ack": 0,
  "hasMedia": true,
  "body": "",
  "type": "image",
  "timestamp": 1644919439,
  "from": "8618500946096@c.us",
  "to": "8613126768525@c.us",
  "deviceType": "android",
  "isForwarded": false,
  "forwardingScore": 0,
  "isStatus": false,
  "isStarred": false,
  "broadcast": false,
  "fromMe": false,
  "hasQuotedMsg": false,
  "vCards": [],
  "mentionedIds": [],
  "isGif": false,
  "isEphemeral": false,
  "links": []
}

Contributor guide