From d881ab5fea079a7f132ac4879df953b651569b05 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Mon, 13 Jun 2022 15:04:36 +0800 Subject: [PATCH 1/3] signal --- internal/push/logic/push_to_client.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/push/logic/push_to_client.go b/internal/push/logic/push_to_client.go index 81afb72d4..78ec80f65 100644 --- a/internal/push/logic/push_to_client.go +++ b/internal/push/logic/push_to_client.go @@ -123,15 +123,15 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) { if offlinePusher == nil { break } - opts, err := GetOfflinePushOpts(pushMsg) - if err != nil { - log.NewError(pushMsg.OperationID, utils.GetSelfFuncName(), "GetOfflinePushOpts failed", pushMsg, err.Error()) - } // save invitation info for offline push if err := db.DB.HandleSignalInfo(pushMsg.MsgData); err != nil { log.NewError(pushMsg.OperationID, utils.GetSelfFuncName(), err.Error(), pushMsg.MsgData) continue } + opts, err := GetOfflinePushOpts(pushMsg) + if err != nil { + log.NewError(pushMsg.OperationID, utils.GetSelfFuncName(), "GetOfflinePushOpts failed", pushMsg, err.Error()) + } log.NewInfo(pushMsg.OperationID, utils.GetSelfFuncName(), UIDList, content, jsonCustomContent, "opts:", opts) pushResult, err := offlinePusher.Push(UIDList, content, jsonCustomContent, pushMsg.OperationID, opts) log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "offline pushResult: ", pushResult) From 94ec584dc3ea7dc97639fa25034b3c03e24be3a5 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Mon, 13 Jun 2022 15:42:48 +0800 Subject: [PATCH 2/3] signal --- internal/msg_gateway/gate/logic.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/msg_gateway/gate/logic.go b/internal/msg_gateway/gate/logic.go index 884f5f842..ad218907b 100644 --- a/internal/msg_gateway/gate/logic.go +++ b/internal/msg_gateway/gate/logic.go @@ -198,7 +198,7 @@ func (ws *WServer) sendMsgResp(conn *UserConn, m *Req, pb *pbChat.SendMsgResp) { } func (ws *WServer) sendSignalMsgReq(conn *UserConn, m *Req) { - log.NewInfo(m.OperationID, "Ws call success to sendSignalMsgReq start", m.MsgIncr, m.ReqIdentifier, m.SendID, m.Data) + log.NewInfo(m.OperationID, "Ws call success to sendSignalMsgReq start", m.MsgIncr, m.ReqIdentifier, m.SendID, string(m.Data)) nReply := new(pbChat.SendMsgResp) isPass, errCode, errMsg, pData := ws.argsValidate(m, constant.WSSendSignalMsg) if isPass { @@ -226,7 +226,7 @@ func (ws *WServer) sendSignalMsgReq(conn *UserConn, m *Req) { MsgData: &msgData, } log.NewInfo(m.OperationID, utils.GetSelfFuncName(), "pbData: ", pbData) - log.NewInfo(m.OperationID, "Ws call success to sendSignalMsgReq middle", m.ReqIdentifier, m.SendID, m.MsgIncr, msgData) + log.NewInfo(m.OperationID, "Ws call success to sendSignalMsgReq middle", m.ReqIdentifier, m.SendID, m.MsgIncr, "session Type", msgData.SessionType) etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImOfflineMessageName) client := pbChat.NewChatClient(etcdConn) reply, err := client.SendMsg(context.Background(), &pbData) From 6dfba3c7b895aac0977b93d675193fefe611730f Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Mon, 13 Jun 2022 16:25:03 +0800 Subject: [PATCH 3/3] group --- internal/api/group/group.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/api/group/group.go b/internal/api/group/group.go index 7d8a89564..529e7494c 100644 --- a/internal/api/group/group.go +++ b/internal/api/group/group.go @@ -858,5 +858,5 @@ func SetGroupMemberInfo(c *gin.Context) { resp.ErrMsg = respPb.CommonResp.ErrMsg resp.ErrCode = respPb.CommonResp.ErrCode log.NewInfo(req.OperationID, utils.GetSelfFuncName(), " api args ", resp) - c.JSON(http.StatusInternalServerError, resp) + c.JSON(http.StatusOK, resp) }