From 91b23ba041a5b66cbce37a90be984198ae69bcc7 Mon Sep 17 00:00:00 2001 From: luhaoling <2198702716@qq.com> Date: Mon, 15 Jan 2024 12:23:12 +0800 Subject: [PATCH] fix: the need token error --- internal/api/msg.go | 2 +- internal/api/route.go | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/internal/api/msg.go b/internal/api/msg.go index 57a049536..965468337 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -423,7 +423,7 @@ func (m *MessageApi) CallbackExample(c *gin.Context) { ServerMsgID: req.ServerMsgID, SenderPlatformID: req.SenderPlatformID, SenderNickname: user.Nickname, - SenderFaceURL: user.UserID, + SenderFaceURL: user.FaceURL, SessionType: req.SessionType, MsgFrom: req.MsgFrom, ContentType: req.ContentType, diff --git a/internal/api/route.go b/internal/api/route.go index 839bc0ff0..e9ce4cede 100644 --- a/internal/api/route.go +++ b/internal/api/route.go @@ -201,7 +201,6 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive msgGroup.POST("/check_msg_is_send_success", m.CheckMsgIsSendSuccess) msgGroup.POST("/get_server_time", m.GetServerTime) - msgGroup.POST("/callbackBeforeSendSingleMsgCommand", m.CallbackExample) } // Conversation conversationGroup := r.Group("/conversation", ParseToken) @@ -222,6 +221,10 @@ func NewGinRouter(discov discoveryregistry.SvcDiscoveryRegistry, rdb redis.Unive statisticsGroup.POST("/group/create", g.GroupCreateCount) statisticsGroup.POST("/group/active", m.GetActiveGroup) } + callback := r.Group("/callbackExample") + { + callback.POST("/callbackBeforeSendSingleMsgCommand", m.CallbackExample) + } return r }