消息接收测试
测试内容
- 1.1 私聊接收 LR5921/LR232/WECHAT/BILI
- 1.2 群聊接收 LR5921/LR232
- 2.1 私聊添加 LR5921/BILI
- 2.2 私聊添加 LR232/WECHAT
- 2.3 群聊添加 LR5921/LR232
- 3.1 私聊删除 LR232/WECHAT
- 3.2 群聊删除 LR5921/LR232
- 4.1 私聊撤回 LR5921
- 4.2 群聊撤回 LR5921
- 5.1 私聊戳戳 LR5921
- 5.2 群聊戳戳 LR5921
- 6.1 群聊回应 LR5921
- 7.1 群聊设精 LR5921
测试结果
- 1.1
- LR5921 私聊临时消息的 sender 字段中无昵称
- LR5921 私聊临时消息多了 group_id,temp_source 字段
- LR232 的文件在 attachments 里面
- 1.2
- 2.1
- LR5921因为设置了任何人都可添加所以会有两条消息,添加时处理第二条
- BILI 接收的是关注列表(有限),每次通过更新最后粉丝的状态标识来检测
- LR5921、BILI 添加没有消息序号
- 2.2
- 2.3
- 均不处理
- 3.1
- 均不处理
- LR5921 无法获取私聊删除
- 3.2
- 均不处理
- 4.1
- 临时消息撤回无法接收
- 4.2
- 5.1
- 戳戳不是发送戳一戳或者窗口抖动,而是双击头像
- 5.2
- 6.1
- 回应只能显示一个表情且数量固定为 1,不会显示消息已有的表情列表
- 回应只能接收对自己表态的
- 7.1
- 自己设置自己的消息为精华则 sender_id 和 user_id 均为 0
- 不接收移出精华
1.1
处理结果
{
"num": 1754212059000,
"platform": "LR5921",
"event": "处理",
"kind": "私聊接收",
"seq": "1916616347",
"content": [
{
"type": "text",
"data": {
"text": "111"
}
}
],
"user": "663748426"
}
LR5921
- 其中 raw 字段过长,之后的 raw 字段用 "raw" 代替
{
"self_id": 3502644244,
"user_id": 663748426,
"time": 1754212059,
"message_id": 1916616347,
"message_seq": 1916616347,
"real_id": 1916616347,
"real_seq": "5881",
"message_type": "private",
"sender": {
"user_id": 663748426,
"nickname": "令狐二中",
"card": ""
},
"raw_message": "111",
"font": 14,
"sub_type": "friend",
"message": [
{
"type": "text",
"data": {
"text": "111"
}
}
],
"message_format": "array",
"post_type": "message",
"target_id": 663748426,
"raw": {
"msgId": "7534283424454407802",
"msgRandom": "1996637746",
"msgSeq": "5881",
"cntSeq": "0",
"chatType": 1,
"msgType": 2,
"subMsgType": 1,
"sendType": 0,
"senderUid": "u_-LwnI9ZCFS_HIOOaRJL58Q",
"peerUid": "u_-LwnI9ZCFS_HIOOaRJL58Q",
"channelId": "",
"guildId": "",
"guildCode": "0",
"fromUid": "0",
"fromAppid": "0",
"msgTime": "1754212059",
"msgMeta": {},
"sendStatus": 2,
"sendRemarkName": "",
"sendMemberName": "",
"sendNickName": "",
"guildName": "",
"channelName": "",
"elements": [
{
"elementType": 1,
"elementId": "7534283424454407801",
"elementGroupId": 0,
"extBufForUI": {},
"textElement": {
"content": "111",
"atType": 0,
"atUid": "0",
"atTinyId": "0",
"atNtUid": "",
"subElementType": 0,
"atChannelId": "0",
"linkInfo": null,
"atRoleId": "0",
"atRoleColor": 0,
"atRoleName": "",
"needNotify": 0
},
"faceElement": null,
"marketFaceElement": null,
"replyElement": null,
"picElement": null,
"pttElement": null,
"videoElement": null,
"grayTipElement": null,
"arkElement": null,
"fileElement": null,
"liveGiftElement": null,
"markdownElement": null,
"structLongMsgElement": null,
"multiForwardMsgElement": null,
"giphyElement": null,
"walletElement": null,
"inlineKeyboardElement": null,
"textGiftElement": null,
"calendarElement": null,
"yoloGameResultElement": null,
"avRecordElement": null,
"structMsgElement": null,
"faceBubbleElement": null,
"shareLocationElement": null,
"tofuRecordElement": null,
"taskTopMsgElement": null,
"recommendedMsgElement": null,
"actionBarElement": null,
"prologueMsgElement": null,
"forwardMsgElement": null
}
],
"records": [],
"emojiLikesList": [],
"commentCnt": "0",
"directMsgFlag": 0,
"directMsgMembers": [],
"peerName": "",
"freqLimitInfo": null,
"editable": false,
"avatarMeta": "",
"avatarPendant": "",
"feedId": "",
"roleId": "0",
"timeStamp": "0",
"clientIdentityInfo": null,
"isImportMsg": false,
"atType": 0,
"roleType": 0,
"fromChannelRoleInfo": {
"roleId": "0",
"name": "",
"color": 0
},
"fromGuildRoleInfo": {
"roleId": "0",
"name": "",
"color": 0
},
"levelRoleInfo": {
"roleId": "0",
"name": "",
"color": 0
},
"recallTime": "0",
"isOnlineMsg": true,
"generalFlags": {},
"clientSeq": "27387",
"fileGroupSize": null,
"foldingInfo": null,
"multiTransInfo": null,
"senderUin": "663748426",
"peerUin": "663748426",
"msgAttrs": {},
"anonymousExtInfo": null,
"nameType": 0,
"avatarFlag": 0,
"extInfoForUI": null,
"personalMedal": null,
"categoryManage": 0,
"msgEventInfo": null,
"sourceType": 1,
"id": 1916616347
}
}
临时消息
{
"self_id": 3502644244,
"user_id": 387,
"time": 1754212437,
"message_id": 1511744574,
"message_seq": 1511744574,
"real_id": 1511744574,
"real_seq": "4",
"message_type": "private",
"sender": {
"user_id": 3874,
"nickname": "临时会话",
"card": ""
},
"raw_message": "1",
"font": 14,
"sub_type": "group",
"message": [
{
"type": "text",
"data": {
"text": "1"
}
}
],
"message_format": "array",
"post_type": "message",
"group_id": 736368697,
"temp_source": 0,
"target_id": 3874,
"raw": raw
}
LR232
{
"op": 0,
"id": "C2C_MESSAGE_CREATE:pyhtgmcdfpievnucqfxapd2fsigwvsbjyvuwtphwlqnfuohchhcigml0xmisoz2",
"d": {
"id": "ROBOT1.0_YVzTU7YSOT5lDwl..a9qHOFQ3vEfWkpkTqjo4HEiy1b3A8zxV9agdrY8Oafhj-gvfhq9hH3pXHU3XeC1XrQ3QAjlj6H3wBCAbx3PilKrAso!",
"content": "1",
"timestamp": "2025-08-03T17:17:47+08:00",
"author": {
"id": "7D296480D464EC5C16714E74A43E5BC7",
"user_openid": "7D296480D464EC5C16714E74A43E5BC7",
"union_openid": "7D296480D464EC5C16714E74A43E5BC7"
},
"attachments": [
{
"url": "https://multimedia.nt.qq.com.cn/download?appid=1406&fileid=EhSCDbrMCGYv504w8Awvml7QIbY4uRjbpAMg_goo2-_4k6LFiwMyBHByb2RaEMgOTLmSn0zCEWu1FKQVcxY&rkey=CAMSKIoMrO0nej4OY6dtO-Iyi1nN7QA8u0wIg4KryEbBDjk3kGouR40xtnU&spec=0",
"filename": "B43A0CF83A2D80BBEFBB9C566FEE436F.jpg",
"width": 520,
"height": 524,
"size": 53851,
"content_type": "image/jpeg",
"content": "",
}
],
"message_scene": {
"source": "default"
},
"message_type": 0
},
"t": "C2C_MESSAGE_CREATE"
}
BILI
{
"code": 0,
"msg": "0",
"message": "0",
"ttl": 1,
"data": {
"session_list": [
{
"talker_id": 260237904,
"session_type": 1,
"at_seqno": 0,
"top_ts": 0,
"group_name": "",
"group_cover": "",
"is_follow": 1,
"is_dnd": 0,
"ack_seqno": 1987039524478995,
"ack_ts": 1754132785814128,
"session_ts": 1754212801312307,
"unread_count": 1,
"last_msg": {
"sender_uid": 260237904,
"receiver_type": 1,
"receiver_id": 651326580,
"msg_type": 1,
"content": "{\"content\":\"1\"}",
"msg_seqno": 1988381970993161,
"timestamp": 1754212801,
"at_uids": null,
"msg_key": 7534286610686792884,
"msg_status": 0,
"notify_code": "",
"msg_source": 7
},
"group_type": 0,
"can_fold": 0,
"status": 0,
"max_seqno": 1988381970993161,
"new_push_msg": 0,
"setting": 0,
"is_guardian": 0,
"is_intercept": 0,
"is_trust": 0,
"system_msg_type": 0,
"live_status": 0,
"biz_msg_unread_count": 0,
"user_label": null
}
],
"has_more": 0,
"anti_disturb_cleaning": false,
"is_address_list_empty": 0,
"show_level": false
}
}
<xml>
<ToUserName><![CDATA[gh_a0180524f340]]></ToUserName>
<FromUserName><![CDATA[orHObs--jF-OZjwOu0NLmd6MIox8]]></FromUserName>
<CreateTime>1754212918</CreateTime>
<MsgType><![CDATA[text]]></MsgType>
<Content><![CDATA[1]]></Content>
<MsgId>25114289184678169</MsgId>
</xml>
1.2
处理结果
{
"num": 1754215051000,
"platform": "LR5921",
"event": "处理",
"kind": "群聊接收",
"seq": "1303527958",
"content": [
{
"type": "text",
"data": {
"text": "1"
}
}
],
"user": "663748426",
"group": "736368697"
}
LR5921
{
"self_id": 3502644244,
"user_id": 663748426,
"time": 1754215050,
"message_id": 1303527958,
"message_seq": 1303527958,
"real_id": 1303527958,
"real_seq": "2164",
"message_type": "group",
"sender": {
"user_id": 663748426,
"nickname": "令狐二中",
"card": "",
"role": "owner"
},
"raw_message": "1",
"font": 14,
"sub_type": "normal",
"message": [
{
"type": "text",
"data": {
"text": "1"
}
}
],
"message_format": "array",
"post_type": "message",
"group_id": 736368697,
"raw": raw
}
LR232
{
"op": 0,
"id": "GROUP_AT_MESSAGE_CREATE:dacellan5e1i41pyqc6jmefkurtsrszra8atoicjxqkgxwpynhysl6q6ws849",
"d": {
"id": "ROBOT1.0_daCellan5..E1i41pYqC6uJop.MRnMA90DWFpSBlgsr1CHSDDk9LOpAgCSrGnu-2CzEhvMXf3YdZkcTzAY5T9bNb5aajO9EgublwlLXnC2U!",
"content": " 1",
"timestamp": "2025-08-03T18:00:39+08:00",
"author": {
"id": "7D296480D464EC5C16714E74A43E5BC7",
"member_openid": "7D296480D464EC5C16714E74A43E5BC7",
"union_openid": "7D296480D464EC5C16714E74A43E5BC7"
},
"group_id": "492C3C6EC6630BD6DD71A32074BDB2F9",
"group_openid": "492C3C6EC6630BD6DD71A32074BDB2F9",
"message_scene": {
"source": "default"
},
"message_type": 0
},
"t": "GROUP_AT_MESSAGE_CREATE"
}
2.1
处理结果
{
"num": 1754184450001,
"platform": "LR5921",
"event": "处理",
"kind": "私聊添加",
"user": "29739"
}
LR5921
{
"self_id": 3502644244,
"user_id": 29739,
"time": 1754184448,
"message_id": 2110943284,
"message_seq": 2110943284,
"real_id": 2110943284,
"real_seq": "120",
"message_type": "private",
"sender": {
"user_id": 29739,
"nickname": "梦",
"card": ""
},
"raw_message": "请求添加你为好友",
"font": 14,
"sub_type": "friend",
"message": [
{
"type": "text",
"data": {
"text": "请求添加你为好友"
}
}
],
"message_format": "array",
"post_type": "message",
"target_id": 29739,
"raw": 'raw'
}
{
"time": 1754184450,
"self_id": 3502644244,
"post_type": "notice",
"notice_type": "friend_add",
"user_id": 29739
}
BILI
{
"code": 0,
"message": "0",
"ttl": 1,
"data": {
"list": [
{
"mid": 260237904,
"attribute": 6,
"mtime": 1754217282,
"tag": null,
"special": 0,
"contract_info": {},
"uname": "xuden",
"face": "https://i0.hdslb.com/bfs/face/member/noface.jpg",
"sign": "测试",
"face_nft": 0,
"official_verify": {
"type": -1,
"desc": ""
},
"vip": {
"vipType": 0,
"vipDueDate": 0,
"dueRemark": "",
"accessStatus": 0,
"vipStatus": 0,
"vipStatusWarn": "",
"themeType": 0,
"label": {
"path": "",
"text": "",
"label_theme": "",
"text_color": "",
"bg_style": 0,
"bg_color": "",
"border_color": ""
},
"avatar_subscript": 0,
"nickname_color": "",
"avatar_subscript_url": ""
},
"name_render": {},
"nft_icon": "",
"rec_reason": "",
"track_id": "",
"follow_time": ""
}
],
"offset": "1739423305:393903105",
"re_version": 0,
"total": 549
}
}
2.2
处理结果
{
"num": 1754185722000,
"platform": "LR232",
"event": "处理",
"kind": "私聊添加",
"seq": "FRIEND_ADD:2848081a-8a65-4f39-b283-58cc31650c5a",
"user": "7D296480D464EC5C16714E74A43E5BC7"
}
LR232
{
"op": 0,
"id": "FRIEND_ADD:2848081a-8a65-4f39-b283-58cc31650c5a",
"d": {
"timestamp": 1754185720,
"openid": "7D296480D464EC5C16714E74A43E5BC7",
"author": {
"union_openid": "7D296480D464EC5C16714E74A43E5BC7"
}
},
"t": "FRIEND_ADD"
}
<xml>
<ToUserName><![CDATA[gh_a0180524f340]]></ToUserName>
<FromUserName><![CDATA[orHObs--jF-OZjwOu0NLmd6MIox8]]></FromUserName>
<CreateTime>1754216787</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[subscribe]]></Event>
<EventKey/>
</xml>
2.3
- 不处理
LR5921
{
"time": 1754187344,
"self_id": 3502644244,
"post_type": "notice",
"group_id": 73636,
"user_id": 3502644244,
"notice_type": "group_increase",
"operator_id": 6637,
"sub_type": "invite"/"approve"
}
LR232
{
"op": 0,
"id": "GROUP_ADD_ROBOT:452426d6-cec0-4eb6-9b40-d923b5c3d0d1",
"d": {
"timestamp": 1754186157,
"group_openid": "492C3C6EC6630BD6DD71A32074BDB2F9",
"op_member_openid": "7D296480D464EC5C16714E74A43E5BC7"
},
"t": "GROUP_ADD_ROBOT"
}
3.1
- 不处理
LR232
{
"op": 0,
"id": "FRIEND_DEL:e1f1f790-43ce-4249-8e81-f7df496deff1",
"d": {
"timestamp": 1741879562,
"openid": "7D296480D464EC5C16714E74A43E5BC7",
"author": {
"union_openid": "7D296480D464EC5C16714E74A43E5BC7"
}
},
"t": "FRIEND_DEL"
}
<xml>
<ToUserName><![CDATA[gh_a0180524f340]]></ToUserName>
<FromUserName><![CDATA[orHObs-DIFeivAtfPdwgiYbiJ2i0]]></FromUserName>
<CreateTime>1752566676</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[unsubscribe]]></Event>
<EventKey/>
</xml>
3.2
- 不处理
LR5921
{
"time": 1742291239,
"self_id": 3502644244,
"post_type": "notice",
"group_id": 736,
"user_id": 2973,
"notice_type": "group_decrease",
"sub_type": "kick"/"leave"/"kick_me",
"operator_id": 0/xxxxx,
}
LR232
{
"op": 0,
"id": "GROUP_DEL_ROBOT:bcffb8e4-693c-4e81-bf34-d5653f3dd781",
"d": {
"timestamp": 1741880615,
"group_openid": "492C3C6EC6630BD6DD71A32074BDB2F9",
"op_member_openid": "7D296480D464EC5C16714E74A43E5BC7",
},
"t": "GROUP_DEL_ROBOT",
}
4.1
处理结果
{
"num": 1754227865000,
"platform": "LR5921",
"event": "处理",
"kind": "私聊撤回",
"seq": "630296639",
"content": [
{
"type": "text",
"data": {
"text": "663748426 撤回了 663748426 的消息"
}
},
{
"type": "text",
"data": {
"text": "1"
}
}
],
"user": "663748426"
}
LR5921
{
"time": 1754227865,
"self_id": 3502644244,
"post_type": "notice",
"notice_type": "friend_recall",
"user_id": 663748426,
"message_id": 630296639
}
4.2
处理结果
{
"num": 1754228786000,
"platform": "LR5921",
"event": "处理",
"kind": "群聊撤回",
"seq": "1615788443",
"content": [
{
"type": "text",
"data": {
"text": "663748426 撤回了 663748426 的消息"
}
},
{
"type": "text",
"data": {
"text": "1"
}
}
],
"user": "663748426",
"group": "736368697"
}
LR5921
{
"time": 1754228786,
"self_id": 3502644244,
"post_type": "notice",
"group_id": 736368697,
"user_id": 663748426,
"notice_type": "group_recall",
"operator_id": 663748426,
"message_id": 1615788443
}
5.1
处理结果
{
"num": 1754229360001,
"platform": "LR5921",
"event": "处理",
"kind": "私聊戳戳",
"content": [
{
"type": "text",
"data": {
"text": "663748426 戳了戳 3502644244 的不在场证明,啊?破案"
}
}
],
"user": "663748426"
}
LR5921
{
"time": 1754229360,
"self_id": 3502644244,
"post_type": "notice",
"notice_type": "notify",
"sub_type": "poke",
"target_id": 3502644244,
"user_id": 663748426,
"raw_info": [
{
"col": "1",
"nm": "",
"type": "qq",
"uid": "u_-LwnI9ZCFS_HIOOaRJL58Q"
},
{
"jp": "https://zb.vip.qq.com/v2/pages/nudgeMall?_wv=2&actionId=0",
"src": "http://tianquan.gtimg.cn/nudgeaction/item/0/expression.jpg",
"type": "img"
},
{
"txt": "戳了戳",
"type": "nor"
},
{
"col": "1",
"nm": "",
"tp": "0",
"type": "qq",
"uid": "u_B-qGpQKZAirvRe3ixCo49g"
},
{
"txt": "的不在场证明,啊?破案",
"type": "nor"
}
],
"sender_id": 663748426
}
5.2
处理结果
{
"num": 1754229260000,
"platform": "LR5921",
"event": "处理",
"kind": "群聊戳戳",
"content": [
{
"type": "text",
"data": {
"text": "663748426 戳了戳 3889270613 "
}
}
],
"user": "663748426",
"group": "736368697"
}
LR5921
{
"time": 1754229260,
"self_id": 3502644244,
"post_type": "notice",
"notice_type": "notify",
"sub_type": "poke",
"target_id": 3889270613,
"user_id": 663748426,
"group_id": 736368697,
"raw_info": [
{
"col": "1",
"nm": "",
"type": "qq",
"uid": "u_-LwnI9ZCFS_HIOOaRJL58Q"
},
{
"jp": "https://zb.vip.qq.com/v2/pages/nudgeMall?_wv=2",
"src": "http://tianquan.gtimg.cn/nudgeaction/item/0/expression.jpg",
"type": "img"
},
{
"txt": "戳了戳",
"type": "nor"
},
{
"col": "1",
"nm": "",
"tp": "0",
"type": "qq",
"uid": "u_VVf7rX3yNUqE-7arjTVEGg"
},
{
"txt": "",
"type": "nor"
}
]
}
6.1
处理结果
{
"num": 1754231404001,
"platform": "LR5921",
"event": "处理",
"kind": "群聊回应",
"content": [
{
"type": "face",
"data": {
"id": "277"
}
}
],
"user": "663748426",
"group": "736368697"
}
LR5921
{
"time": 1754231404,
"self_id": 3502644244,
"post_type": "notice",
"group_id": 736368697,
"user_id": 663748426,
"notice_type": "group_msg_emoji_like",
"likes": [
{
"emoji_id": "277",
"count": 1
}
]
}
7.1
处理结果
{
"num": 1754231712000,
"platform": "LR5921",
"event": "处理",
"kind": "群聊设精",
"content": [
{
"type": "text",
"data": {
"text": "663748426 给 3502644244 的消息设置了精华"
}
}
],
"user": "3502644244",
"group": "736368697"
}
LR5921
{
"time": 1754231712,
"self_id": 3502644244,
"post_type": "notice",
"group_id": 736368697,
"user_id": 3502644244,
"notice_type": "essence",
"sender_id": 3502644244,
"operator_id": 663748426,
"sub_type": "add"
}