From ec17e76de72c68c7d2348133606b4e8e0c4f8ea2 Mon Sep 17 00:00:00 2001 From: SanaeFox <36219542+Hoshinonyaruko@users.noreply.github.com> Date: Fri, 10 Nov 2023 17:43:24 +0800 Subject: [PATCH] Test4 (#62) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Compiled main.go and pushed changes * test * 适配了频道私聊,用bolt数据库取代ini * 适配了nonebot2 * add license * add a lot * trss support * add action * add action * add action * fixbug * add wss * bugfix * fix action * fix action again * fa * fix * add a lot * add ws server token * bugifx * fixat * bugfix * bugfix * test * test2 * add url service * add url service * bugfix * fix * fix * fix * bug fix * fix * test * add webui * add image_compress * bug fix * fix cq code * fixbug * bugfix * bugfix * bugfix * bugfix * bugfix * bugfix * bugfix * add new feature * bugfix * bugfix * bugfix * bugfix * bugfix * merge * bugfix * bugfix * bugfix * test * test * test * test * test * test * test * test * test * test * test * test * test * test * test * test * test * bugfix * bugfix * Remove dist directory from tracking * test * test * bugfix2 * bugfix3 * bugfix5 * bugfix5 * bugfix6 * bugfix7 * bugfix9 * bugfix10 * bugfix11 * bugfix12 * bugfix13 * bugfix14 * add feature * add feature * add feature --- handlers/send_private_msg.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/handlers/send_private_msg.go b/handlers/send_private_msg.go index e51e4424..9cff8454 100644 --- a/handlers/send_private_msg.go +++ b/handlers/send_private_msg.go @@ -194,10 +194,15 @@ func handleSendGuildChannelPrivateMsg(client callapi.Client, api openapi.OpenAPI } } mylog.Println("私聊信息messageText:", messageText) - //mylog.Println("foundItems:", foundItems) + //还原真实的userid todo 太绕了 要精简下逻辑 + UserID, err := idmap.RetrieveRowByIDv2(message.Params.UserID.(string)) + if err != nil { + mylog.Printf("Error reading config: %v", err) + return + } // 如果messageID为空,通过函数获取 if messageID == "" { - messageID = GetMessageIDByUseridOrGroupid(config.GetAppIDStr(), message.Params.UserID) + messageID = GetMessageIDByUseridOrGroupid(config.GetAppIDStr(), UserID) mylog.Println("通过GetMessageIDByUserid函数获取的message_id:", messageID) }