Open GLDYM opened 5 months ago
OneBot
例如有这样一个文件上传通知,Lagrange会发送两个消息,一个Msg一个Notice:
info: Lagrange.Core.BotContext[0] [2024-06-02 21:34:30] [MessagingLogic] [VERBOSE]: [MessageChain(114514)(114514)] [File] test2.zip (214631): https://49.86.42.147:443/ftn_handler/63b217eeed4afe8504fa7685894457a7796eeefdfb55a2d71837458c35c77bca33597dcb4e39f9bfe52944ed2d8644922223224b46508920a075b140abc2fcc1/?fname= trce: Lagrange.OneBot.Core.Network.Service.ForwardWSService[13] Send(860f066b-b147-4cb1-8104-a034116fd14b) {"message_type":"group","sub_type":"normal","message_id":69025205,"group_id":114514,"user_id":114514,"anonymous":null,"message":[],"raw_message":"","font":0,"sender":{"user_id":114514,"nickname":"\u5317\u8FB0\u661F\u5149","card":"\u767D\u5929\u7761\u4E0D\u7740\uFF0C\u665A\u4E0A\u8D77\u4E0D\u6765","sex":"unknown","age":0,"area":"","level":"100","role":"admin","title":""},"time":1717335270,"self_id":449427853,"post_type":"message"} trce: Lagrange.OneBot.Core.Network.Service.ReverseWSService[1] [ReverseWSService] Send: {"message_type":"group","sub_type":"normal","message_id":69025205,"group_id":114514,"user_id":114514,"anonymous":null,"message":[],"raw_message":"","font":0,"sender":{"user_id":114514,"nickname":"\u5317\u8FB0\u661F\u5149","card":"\u767D\u5929\u7761\u4E0D\u7740\uFF0C\u665A\u4E0A\u8D77\u4E0D\u6765","sex":"unknown","age":0,"area":"","level":"100","role":"admin","title":""},"time":1717335270,"self_id":449427853,"post_type":"message"} trce: Lagrange.OneBot.Core.Network.Service.ForwardWSService[13] Send(860f066b-b147-4cb1-8104-a034116fd14b) {"group_id":114514,"user_id":114514,"file":{"id":"/01daa86c-d4c8-49c2-8c83-1cc30040908e","name":"test2.zip","size":214631,"busid":0,"url":"https://49.86.42.147:443/ftn_handler/63b217eeed4afe8504fa7685894457a7796eeefdfb55a2d71837458c35c77bca33597dcb4e39f9bfe52944ed2d8644922223224b46508920a075b140abc2fcc1/?fname="},"notice_type":"group_upload","time":1717335270,"self_id":449427853,"post_type":"notice"}
在QQNT中,对文件进行reply表现为对那个Msg的回复:
{"type":"reply","data":{"id":"69025205"}}
显然这是同一条信息,但是这个Msg与Notice的上报信息之间没有任何关联字段表明这两个消息为同一个,使用时间判别在高并发状态下显然是不可取的。是否可以向Notice事件的"file"字段加入"message_id"字段(或者其他方式)表明这两个消息实际上为同一条消息?
实际为两个消息 带有 message_id 的是在聊天页面内显示的文件消息 不带 message_id 的是在聊天列表显示的 [有新文件] 事件
message_id
[有新文件]
Lagrange项目
OneBot
新需求内容
例如有这样一个文件上传通知,Lagrange会发送两个消息,一个Msg一个Notice:
在QQNT中,对文件进行reply表现为对那个Msg的回复:
显然这是同一条信息,但是这个Msg与Notice的上报信息之间没有任何关联字段表明这两个消息为同一个,使用时间判别在高并发状态下显然是不可取的。是否可以向Notice事件的"file"字段加入"message_id"字段(或者其他方式)表明这两个消息实际上为同一条消息?