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

关于 WhatsApp 动态 #368

Open
su-chang opened this issue May 24, 2022 · 2 comments
Open

关于 WhatsApp 动态 #368

su-chang opened this issue May 24, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@su-chang
Copy link
Member

su-chang commented May 24, 2022

关于 whatsapp 动态

双方必须互在对方通讯录中才可以看到对方动态,否则无法查看动态。

动态支持的种类:

  • 文字(支持背景色)
  • 图片 (+ 文字)
  • 视频 (+ 文字)

可以针对动态进行回复(回复的形式:文字,表情,图片,视频)

若动态被查阅后,会有对应的ack变动(仅针对初次被查看),且目前无法统计到观看人数和具体成员。

如何区分动态和消息

可以根据 isStatus 字段结合 to 字段来判断当前消息是否为动态消息。

"to": "status@broadcast",
"isStatus": true,

数据结构

  • 文本动态
{
  "_data": {
    "id": {
      "fromMe": true,
      "remote": "status@broadcast",
      "id": "3AE6D3A6CE1DB154C942",
      "participant": "[email protected]",
      "_serialized": "true_status@[email protected]"
    },
    "body": "这是一条动态消息",
    "type": "chat",
    "t": 1653377488,
    "notifyName": "苏畅",
    "from": "[email protected]",
    "to": "status@broadcast",
    "author": "[email protected]",
    "self": "in",
    "ack": 1,
    "isNewMsg": true,
    "star": false,
    "recvFresh": true,
    "isFromTemplate": false,
    "thumbnail": "",
    "broadcast": false,
    "mentionedJidList": [],
    "isVcardOverMmsDocument": false,
    "backgroundColor": 4287391886,
    "font": 0,
    "isForwarded": false,
    "hasReaction": false,
    "productHeaderImageRejected": false,
    "lastPlaybackProgress": 0,
    "isDynamicReplyButtonsMsg": false,
    "isMdHistoryMsg": false,
    "requiresDirectConnection": false,
    "pttForwardedFeaturesEnabled": true,
    "isEphemeral": false,
    "isStatusV3": true,
    "links": []
  },
  "id": {
    "fromMe": true,
    "remote": "status@broadcast",
    "id": "3AE6D3A6CE1DB154C942",
    "participant": "[email protected]",
    "_serialized": "true_status@[email protected]"
  },
  "ack": 1,
  "hasMedia": false,
  "body": "这是一条动态消息",
  "type": "chat",
  "timestamp": 1653377488,
  "from": "[email protected]",
  "to": "status@broadcast",
  "author": "[email protected]",
  "deviceType": "ios",
  "isForwarded": false,
  "forwardingScore": 0,
  "isStatus": true,
  "isStarred": false,
  "broadcast": false,
  "fromMe": true,
  "hasQuotedMsg": false,
  "vCards": [],
  "mentionedIds": [],
  "isGif": false,
  "isEphemeral": false,
  "links": []
}
  • 图片动态
{
  "_data": {
    "id": {
      "fromMe": true,
      "remote": "status@broadcast",
      "id": "3A39AF5761502FE6273A",
      "participant": "[email protected]",
      "_serialized": "true_status@[email protected]"
    },
    "body": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDABEMDQ8NCxEPDg8TEhEUGSocGRcXGTQlJx8qPTZBQDw2OzpETGJTREhcSTo7VXRWXGVobW5tQlJ4gHdqf2JrbWn/2wBDARITExkWGTIcHDJpRjtGaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWn/wgARCABgADYDASIAAhEBAxEB/8QAGwAAAgMBAQEAAAAAAAAAAAAABAUAAwYCAQf/xAAYAQADAQEAAAAAAAAAAAAAAAAAAQMCBP/aAAwDAQACEAMQAAAAz2qx/wBFTwW8zr1p2nbo2sPPYkRsss6lZnlgqKzOHt5FRCoBmeZIsbZHJX+8MOSOXmmWwaZFt0cap31N1cNOCut4GhMy6RzU3H12DNkvRz6EzKG2m8iOBYh0tPJ0Zw24Kh53x1SHk8gf/8QAHhEAAgICAgMAAAAAAAAAAAAAAAECERAhAxIgMUH/2gAIAQIBAT8ATGR94Uqk/CMabPpssU6m0yLt4olubOMtFo7bbFK8/wD/xAAbEQEAAQUBAAAAAAAAAAAAAAABEAACERIhIP/aAAgBAwEBPwBIYeh4Xh41zaNJibR1MFXxirnU7WmSf//EADoQAAEDAgMEBggDCQAAAAAA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TiTeRxZzSMu4bjTZEEDgSKJomv/+AAMA/9k=",
    "type": "image",
    "t": 1653379386,
    "notifyName": "苏畅",
    "from": "[email protected]",
    "to": "status@broadcast",
    "author": "[email protected]",
    "self": "in",
    "ack": 1,
    "isNewMsg": true,
    "star": false,
    "recvFresh": true,
    "interactiveAnnotations": [],
    "deprecatedMms3Url": "https://mmg.whatsapp.net/d/f/ApqewmrW6sxBI0assipX7JieuyJ3Li_GNN9ZkRmZshaE.enc",
    "directPath": "/v/t62.7118-24/34621241_715083526580060_6368983793212164355_n.enc?ccb=11-4&oh=01_AVzAxQey8OEA4IpGP0JNO25a30S-dRk9NWi0GGvxU5qkfw&oe=62B3AE31",
    "mimetype": "image/jpeg",
    "filehash": "LtE7EtNVjHpryDbkMvNmsmBpM+kSr3V3arcl3NwU9gc=",
    "encFilehash": "CyOtdJ3Yd0Bon+x46BcWFYnJyiE4k8JKvoVEoIV7qHQ=",
    "size": 93559,
    "mediaKey": "CaMbCiY2liS7q5pPV0/GPc4ee6lYJShwIsoYK/AjeRc=",
    "mediaKeyTimestamp": 1653379378,
    "isViewOnce": false,
    "width": 608,
    "height": 1080,
    "staticUrl": "",
    "scanLengths": [7200, 34092, 19338, 32927],
    "scansSidecar": {},
    "isFromTemplate": false,
    "broadcast": false,
    "mentionedJidList": [],
    "isVcardOverMmsDocument": false,
    "isForwarded": false,
    "hasReaction": false,
    "productHeaderImageRejected": false,
    "lastPlaybackProgress": 0,
    "isDynamicReplyButtonsMsg": false,
    "isMdHistoryMsg": false,
    "requiresDirectConnection": false,
    "pttForwardedFeaturesEnabled": true,
    "isEphemeral": false,
    "isStatusV3": true,
    "links": []
  },
  "mediaKey": "CaMbCiY2liS7q5pPV0/GPc4ee6lYJShwIsoYK/AjeRc=",
  "id": {
    "fromMe": true,
    "remote": "status@broadcast",
    "id": "3A39AF5761502FE6273A",
    "participant": "[email protected]",
    "_serialized": "true_status@[email protected]"
  },
  "ack": 1,
  "hasMedia": true,
  "body": "",
  "type": "image",
  "timestamp": 1653379386,
  "from": "[email protected]",
  "to": "status@broadcast",
  "author": "[email protected]",
  "deviceType": "ios",
  "isForwarded": false,
  "forwardingScore": 0,
  "isStatus": true,
  "isStarred": false,
  "broadcast": false,
  "fromMe": true,
  "hasQuotedMsg": false,
  "vCards": [],
  "mentionedIds": [],
  "isGif": false,
  "isEphemeral": false,
  "links": []
}
  • 视频动态
{
  "_data": {
    "id": {
      "fromMe": true,
      "remote": "status@broadcast",
      "id": "3A56A5C434DC260F7960",
      "participant": "[email protected]",
      "_serialized": "true_status@[email protected]"
    },
    "body": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDABEMDQ8NCxEPDg8TEhEUGSocGRcXGTQlJx8qPTZBQDw2OzpETGJTREhcSTo7VXRWXGVobW5tQlJ4gHdqf2JrbWn/2wBDARITExkWGTIcHDJpRjtGaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWlpaWn/wgARCABgAC0DASIAAhEBAxEB/8QAGgABAAMBAQEAAAAAAAAAAAAAAAECAwUEBv/EABUBAQEAAAAAAAAAAAAAAAAAAAAB/9oADAMBAAIQAxAAAAD7Hbl9GtAZzcYzzPeujS6YXWPF6+T0ZfQkkJGGkqlAlAAAAhSSzKxNqWX/xAAWEQADAAAAAAAAAAAAAAAAAAAQETD/2gAIAQIBAT8ALv8A/8QAGxEAAgIDAQAAAAAAAAAAAAAAAREAEAIhMDH/2gAIAQMBAT8As4ke04yeZT1P/8QALxAAAgEDAwICCAcAAAAAAAAAAQIDABESBDFREyEFYRAUICIyQYGhBiNAUnGRwf/aAAgBAQABPwA9RpCEnUAH4cQSKFwBc3PPpdZC91kCrxjc/wB1ErrGolcSON2C43+lT6yeKeYRaK5W+LlW77d+w2qB2khR3XFmFyLbey8chYlZLC9BHAF2ueawbn71g3P3rBufvSggd6k/EGnj8T9TMbYiTpmTIdm22o6uzMDpdR2Nr4jv33qI9SNXKsmQvi24rEUkkbu6K12j+IcUuLqGU3B+dN4XoW13rjQKZwcr3Nr822vRVG3VTWRrI1l5CsvIU3iqDxRtMdE+GWBlPzPNuKgkvIyNp3hAJ95iLGx/2sRWIrEViKOnhM/WMS9T91EKd1U/Ssj5VkayNZH9HcXtfvx7CSI4JR1YA2Nje3o6f5vU8rU1gQxNgKd43t72x4NF1f3Q3f8Ag0kMcaMqIqht7C1zSrioHFf//gADAP/Z",
    "type": "video",
    "t": 1653394769,
    "notifyName": "苏畅",
    "from": "[email protected]",
    "to": "status@broadcast",
    "author": "[email protected]",
    "self": "in",
    "ack": 1,
    "isNewMsg": true,
    "star": false,
    "recvFresh": true,
    "caption": "我发的视频动态",
    "interactiveAnnotations": [],
    "deprecatedMms3Url": "https://mmg.whatsapp.net/d/f/Aiw_trp7HDul1ah_1fzyyWX-5asC270tjcnoKV0pinfI.enc",
    "directPath": "/v/t62.7161-24/17609980_1133776517478548_8959354155713027572_n.enc?ccb=11-4&oh=01_AVx9gn4G_0FPofSbhqo-5ppc7W0jqBiCBqysoO-chlnX1w&oe=62B39F91",
    "mimetype": "video/mp4",
    "duration": "18",
    "filehash": "DXgrZwEKqGCTxXwI8lHKCsUA6MCztYhAsCIeU/BlTK8=",
    "encFilehash": "MED6CWuG7lNLYPI/w1MHHfpbkBaXioZ442nXlYiO4nw=",
    "size": 2413418,
    "streamingSidecar": {},
    "mediaKey": "18MMiL/ifVtsvJ5j5Ropi5YMn1ua8Z+Ws3F09L6jHkc=",
    "mediaKeyTimestamp": 1653394762,
    "isViewOnce": false,
    "width": 400,
    "height": 848,
    "staticUrl": "",
    "isFromTemplate": false,
    "broadcast": false,
    "mentionedJidList": [],
    "isVcardOverMmsDocument": false,
    "isForwarded": false,
    "hasReaction": false,
    "productHeaderImageRejected": false,
    "lastPlaybackProgress": 0,
    "isDynamicReplyButtonsMsg": false,
    "isMdHistoryMsg": false,
    "requiresDirectConnection": false,
    "pttForwardedFeaturesEnabled": true,
    "isEphemeral": false,
    "isStatusV3": true,
    "links": []
  },
  "mediaKey": "18MMiL/ifVtsvJ5j5Ropi5YMn1ua8Z+Ws3F09L6jHkc=",
  "id": {
    "fromMe": true,
    "remote": "status@broadcast",
    "id": "3A56A5C434DC260F7960",
    "participant": "[email protected]",
    "_serialized": "true_status@[email protected]"
  },
  "ack": 1,
  "hasMedia": true,
  "body": "我发的视频动态",
  "type": "video",
  "timestamp": 1653394769,
  "from": "[email protected]",
  "to": "status@broadcast",
  "author": "[email protected]",
  "deviceType": "ios",
  "isForwarded": false,
  "forwardingScore": 0,
  "isStatus": true,
  "isStarred": false,
  "broadcast": false,
  "fromMe": true,
  "hasQuotedMsg": false,
  "duration": "18",
  "vCards": [],
  "mentionedIds": [],
  "isGif": false,
  "isEphemeral": false,
  "links": []
}

示意图

image

@su-chang
Copy link
Member Author

su-chang commented May 24, 2022

关于动态的回复

以引用消息的形式发送至对方。

bot无法回复自己发送的动态。

bot对他人动态的回复

{
  "_data": {
    "id": {
      "fromMe": true,
      "remote": "[email protected]",
      "id": "3A850D96A64F3C6DB2C8",
      "_serialized": "[email protected]_3A850D96A64F3C6DB2C8"
    },
    "body": "别烦别烦",
    "type": "chat",
    "t": 1653392634,
    "notifyName": "苏畅",
    "from": "[email protected]",
    "to": "[email protected]",
    "self": "in",
    "ack": 1,
    "isNewMsg": true,
    "star": false,
    "recvFresh": true,
    "isFromTemplate": false,
    "thumbnail": "",
    "broadcast": false,
    "quotedMsg": {
      "type": "chat",
      "body": "好烦呀",
      "thumbnail": "",
      "backgroundColor": 4287539263,
      "font": 0
    },
    "quotedStanzaID": "3A28CDB9BA235693F364",
    "quotedRemoteJid": "status@broadcast",
    "quotedParticipant": "[email protected]",
    "mentionedJidList": [],
    "isVcardOverMmsDocument": false,
    "hasReaction": false,
    "ephemeralOutOfSync": false,
    "productHeaderImageRejected": false,
    "lastPlaybackProgress": 0,
    "isDynamicReplyButtonsMsg": false,
    "isMdHistoryMsg": false,
    "requiresDirectConnection": false,
    "pttForwardedFeaturesEnabled": true,
    "isEphemeral": false,
    "isStatusV3": false,
    "links": []
  },
  "id": {
    "fromMe": true,
    "remote": "[email protected]",
    "id": "3A850D96A64F3C6DB2C8",
    "_serialized": "[email protected]_3A850D96A64F3C6DB2C8"
  },
  "ack": 1,
  "hasMedia": false,
  "body": "别烦别烦",
  "type": "chat",
  "timestamp": 1653392634,
  "from": "[email protected]",
  "to": "[email protected]",
  "deviceType": "ios",
  "forwardingScore": 0,
  "isStatus": false,
  "isStarred": false,
  "broadcast": false,
  "fromMe": true,
  "hasQuotedMsg": true,
  "vCards": [],
  "mentionedIds": [],
  "isGif": false,
  "isEphemeral": false,
  "links": []
}

他人对bot的动态回复

{
  "_data": {
    "id": {
      "fromMe": false,
      "remote": "[email protected]",
      "id": "3A4B7256DDE94DB2A7EA",
      "_serialized": "[email protected]_3A4B7256DDE94DB2A7EA"
    },
    "body": "这是啥",
    "type": "chat",
    "t": 1653392783,
    "notifyName": "测试9号",
    "from": "[email protected]",
    "to": "[email protected]",
    "self": "in",
    "ack": 1,
    "isNewMsg": true,
    "star": false,
    "recvFresh": true,
    "isFromTemplate": false,
    "thumbnail": "",
    "broadcast": false,
    "quotedMsg": {
      "type": "chat",
      "body": "新的动态",
      "thumbnail": "",
      "backgroundColor": 4285997368,
      "font": 2
    },
    "quotedStanzaID": "3A86D6CAAC444BAB2719",
    "quotedRemoteJid": "status@broadcast",
    "quotedParticipant": "[email protected]",
    "mentionedJidList": [],
    "isVcardOverMmsDocument": false,
    "hasReaction": false,
    "ephemeralOutOfSync": false,
    "productHeaderImageRejected": false,
    "lastPlaybackProgress": 0,
    "isDynamicReplyButtonsMsg": false,
    "isMdHistoryMsg": false,
    "requiresDirectConnection": false,
    "pttForwardedFeaturesEnabled": true,
    "isEphemeral": false,
    "isStatusV3": false,
    "links": []
  },
  "id": {
    "fromMe": false,
    "remote": "[email protected]",
    "id": "3A4B7256DDE94DB2A7EA",
    "_serialized": "[email protected]_3A4B7256DDE94DB2A7EA"
  },
  "ack": 1,
  "hasMedia": false,
  "body": "这是啥",
  "type": "chat",
  "timestamp": 1653392783,
  "from": "[email protected]",
  "to": "[email protected]",
  "deviceType": "ios",
  "forwardingScore": 0,
  "isStatus": false,
  "isStarred": false,
  "broadcast": false,
  "fromMe": false,
  "hasQuotedMsg": true,
  "vCards": [],
  "mentionedIds": [],
  "isGif": false,
  "isEphemeral": false,
  "links": []
}

@su-chang su-chang changed the title whatsapp动态消息被认为是来自联系人 status@broadcast 的消息。 关于 WhatsApp 动态 May 24, 2022
@su-chang
Copy link
Member Author

关于动态的撤回

新接收到的消息

{
  "_data": {
    "id": {
      "fromMe": true,
      "remote": "status@broadcast",
      "id": "3AFC180F08EBFF68DBFD",
      "participant": "[email protected]",
      "_serialized": "true_status@[email protected]"
    },
    "type": "revoked",
    "subtype": "sender",
    "t": 1653377488,
    "notifyName": "",
    "from": "[email protected]",
    "to": "status@broadcast",
    "author": "[email protected]",
    "self": "in",
    "ack": 1,
    "isNewMsg": true,
    "star": false,
    "recvFresh": true,
    "isFromTemplate": false,
    "broadcast": false,
    "isVcardOverMmsDocument": false,
    "revokeSender": "[email protected]",
    "backgroundColor": 4287391886,
    "font": 0,
    "isForwarded": false,
    "hasReaction": false,
    "productHeaderImageRejected": false,
    "lastPlaybackProgress": 0,
    "isDynamicReplyButtonsMsg": false,
    "isMdHistoryMsg": false,
    "requiresDirectConnection": false,
    "pttForwardedFeaturesEnabled": true,
    "isEphemeral": false,
    "isStatusV3": true,
    "links": []
  },
  "id": {
    "fromMe": true,
    "remote": "status@broadcast",
    "id": "3AFC180F08EBFF68DBFD",
    "participant": "[email protected]",
    "_serialized": "true_status@[email protected]"
  },
  "ack": 1,
  "hasMedia": false,
  "body": "",
  "type": "revoked",
  "timestamp": 1653377488,
  "from": "[email protected]",
  "to": "status@broadcast",
  "author": "[email protected]",
  "deviceType": "ios",
  "isForwarded": false,
  "forwardingScore": 0,
  "isStatus": true,
  "isStarred": false,
  "broadcast": false,
  "fromMe": true,
  "hasQuotedMsg": false,
  "vCards": [],
  "mentionedIds": [],
  "isGif": false,
  "isEphemeral": false,
  "links": []
}

原消息

{
  "_data": {
    "id": {
      "fromMe": true,
      "remote": "status@broadcast",
      "id": "3AFC180F08EBFF68DBFD",
      "participant": "[email protected]",
      "_serialized": "true_status@[email protected]"
    },
    "body": "这是一条动态消息",
    "type": "chat",
    "t": 1653377488,
    "notifyName": "",
    "from": "[email protected]",
    "to": "status@broadcast",
    "author": "[email protected]",
    "self": "in",
    "ack": 1,
    "isNewMsg": true,
    "star": false,
    "recvFresh": true,
    "isFromTemplate": false,
    "thumbnail": "",
    "broadcast": false,
    "mentionedJidList": [],
    "isVcardOverMmsDocument": false,
    "backgroundColor": 4287391886,
    "font": 0,
    "isForwarded": false,
    "hasReaction": false,
    "productHeaderImageRejected": false,
    "lastPlaybackProgress": 0,
    "isDynamicReplyButtonsMsg": false,
    "isMdHistoryMsg": false,
    "requiresDirectConnection": false,
    "pttForwardedFeaturesEnabled": true,
    "isEphemeral": false,
    "isStatusV3": true,
    "links": []
  },
  "id": {
    "fromMe": true,
    "remote": "status@broadcast",
    "id": "3AFC180F08EBFF68DBFD",
    "participant": "[email protected]",
    "_serialized": "true_status@[email protected]"
  },
  "ack": 1,
  "hasMedia": false,
  "body": "这是一条动态消息",
  "type": "chat",
  "timestamp": 1653377488,
  "from": "[email protected]",
  "to": "status@broadcast",
  "author": "[email protected]",
  "deviceType": "ios",
  "isForwarded": false,
  "forwardingScore": 0,
  "isStatus": true,
  "isStarred": false,
  "broadcast": false,
  "fromMe": true,
  "hasQuotedMsg": false,
  "vCards": [],
  "mentionedIds": [],
  "isGif": false,
  "isEphemeral": false,
  "links": []
}

@lijiarui lijiarui added the bug Something isn't working label May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants