-
Notifications
You must be signed in to change notification settings - Fork 21
Description
此bug类似于#9
猜测是群成员进群后,没有刷新群成员缓存,在回复时艾特(mention)了新进群的成员,导致提示Target 940135171 is invalid in group 935193053 or not found.
目前暂时的解决办法:新成员加群后,关闭框架,重新打开,连接框架,即可。但是实际上如果总有人加群,那么这个解决办法不合适,总不能每加进来一个,都要重启框架把!?
还配有一个截图,包括了日志和发消息的日志,文件名是艾特群成员失败导致发不出消息的bug.png。
以下是框架日志:

dbug: Lagrange.Milky.Api.MilkyHttpApiService[4]
00000000-0000-0000-9c02-0080000000fe 127.0.0.1:52819 <<-- {"status":"failed","retcode":-400,"message":"Internal server error"}
dbug: Lagrange.Milky.Api.MilkyHttpApiService[1]
00000000-0000-0000-2803-0080000000f5 127.0.0.1:52860 -->> POST /api/send_group_message
dbug: Lagrange.Milky.Api.MilkyHttpApiService[2]
00000000-0000-0000-2803-0080000000f5 127.0.0.1:52860 -->> {"group_id":935193053,"message":[{"type":"mention","data":{"user_id":940135171}},{"type":"text","data":{"text":"\t 未成功登录!可尝试重新输入指令!\r\nptuiCB('65','0','','0',' 二维码已失效。', '')"}}]}
fail: Lagrange.Milky.Api.MilkyHttpApiService[996]
00000000-0000-0000-2803-0080000000f5 127.0.0.1:52860 <!!> Handle api failed
Lagrange.Core.Exceptions.InvalidTargetException: Target 940135171 is invalid in group 935193053 or not found.
at Lagrange.Core.Message.Entities.MentionEntity.Lagrange.Core.Message.Entities.IMessageEntity.Preprocess(BotContext context, BotMessage message)
at Lagrange.Core.Internal.Logic.MessagingLogic.BuildMessage(MessageChain chain, BotContact contact, BotContact receiver)
at Lagrange.Core.Internal.Logic.MessagingLogic.SendGroupMessage(Int64 groupUin, MessageChain chain)
at Lagrange.Milky.Api.Handler.Message.SendGroupMessageHandler.HandleAsync(SendGroupMessageParameter parameter, CancellationToken token)
at Lagrange.Milky.Api.Handler.IApiHandler`2.Lagrange.Milky.Api.Handler.IApiHandler.HandleAsync(Object parameter, CancellationToken token)
at Lagrange.Milky.Api.MilkyHttpApiService.GetResultAsync(HttpListenerContext context, IApiHandler handler, Object parameter, CancellationToken token)
dbug: Lagrange.Milky.Api.MilkyHttpApiService[4]
00000000-0000-0000-2803-0080000000f5 127.0.0.1:52860 <<-- {"status":"failed","retcode":-400,"message":"Internal server error"}