diff --git a/internal/msg_gateway/gate/callback.go b/internal/msg_gateway/gate/callback.go index 53740ae9d..1b8c29a90 100644 --- a/internal/msg_gateway/gate/callback.go +++ b/internal/msg_gateway/gate/callback.go @@ -27,7 +27,7 @@ func callbackUserOnline(operationID, userID string, platformID int, token string }, Seq: int(time.Now().UnixNano() / 1e6), } - callbackUserOnlineResp := &cbApi.CallbackUserOnlineResp{CommonCallbackResp: callbackResp} + callbackUserOnlineResp := &cbApi.CallbackUserOnlineResp{CommonCallbackResp: &callbackResp} if err := http.CallBackPostReturn(config.Config.Callback.CallbackUrl, constant.CallbackUserOnlineCommand, callbackUserOnlineReq, callbackUserOnlineResp, config.Config.Callback.CallbackUserOnline.CallbackTimeOut); err != nil { callbackResp.ErrCode = http2.StatusInternalServerError callbackResp.ErrMsg = err.Error() @@ -52,7 +52,7 @@ func callbackUserOffline(operationID, userID string, platformID int) cbApi.Commo }, Seq: int(time.Now().UnixNano() / 1e6), } - callbackUserOfflineResp := &cbApi.CallbackUserOfflineResp{CommonCallbackResp: callbackResp} + callbackUserOfflineResp := &cbApi.CallbackUserOfflineResp{CommonCallbackResp: &callbackResp} if err := http.CallBackPostReturn(config.Config.Callback.CallbackUrl, constant.CallbackUserOfflineCommand, callbackOfflineReq, callbackUserOfflineResp, config.Config.Callback.CallbackUserOffline.CallbackTimeOut); err != nil { callbackResp.ErrCode = http2.StatusInternalServerError callbackResp.ErrMsg = err.Error() @@ -77,7 +77,7 @@ func callbackUserKickOff(operationID string, userID string, platformID int) cbAp }, Seq: int(time.Now().UnixNano() / 1e6), } - callbackUserKickOffResp := &cbApi.CallbackUserKickOffResp{CommonCallbackResp: callbackResp} + callbackUserKickOffResp := &cbApi.CallbackUserKickOffResp{CommonCallbackResp: &callbackResp} if err := http.CallBackPostReturn(config.Config.Callback.CallbackUrl, constant.CallbackUserKickOffCommand, callbackUserKickOffReq, callbackUserKickOffResp, config.Config.Callback.CallbackUserOffline.CallbackTimeOut); err != nil { callbackResp.ErrCode = http2.StatusInternalServerError callbackResp.ErrMsg = err.Error() diff --git a/internal/push/logic/callback.go b/internal/push/logic/callback.go index c266ab95a..a7cff2c20 100644 --- a/internal/push/logic/callback.go +++ b/internal/push/logic/callback.go @@ -36,7 +36,7 @@ func callbackOfflinePush(operationID string, userIDList []string, msg *commonPb. AtUserIDList: msg.AtUserIDList, Content: callback.GetContent(msg), } - resp := &cbApi.CallbackBeforePushResp{CommonCallbackResp: callbackResp} + resp := &cbApi.CallbackBeforePushResp{CommonCallbackResp: &callbackResp} if err := http.CallBackPostReturn(config.Config.Callback.CallbackUrl, constant.CallbackOfflinePushCommand, req, resp, config.Config.Callback.CallbackOfflinePush.CallbackTimeOut); err != nil { callbackResp.ErrCode = http2.StatusInternalServerError callbackResp.ErrMsg = err.Error() @@ -84,7 +84,7 @@ func callbackOnlinePush(operationID string, userIDList []string, msg *commonPb.M AtUserIDList: msg.AtUserIDList, Content: callback.GetContent(msg), } - resp := &cbApi.CallbackBeforePushResp{CommonCallbackResp: callbackResp} + resp := &cbApi.CallbackBeforePushResp{CommonCallbackResp: &callbackResp} if err := http.CallBackPostReturn(config.Config.Callback.CallbackUrl, constant.CallbackOnlinePushCommand, req, resp, config.Config.Callback.CallbackOnlinePush.CallbackTimeOut); err != nil { callbackResp.ErrCode = http2.StatusInternalServerError callbackResp.ErrMsg = err.Error() @@ -126,7 +126,7 @@ func callbackBeforeSuperGroupOnlinePush(operationID string, groupID string, msg AtUserIDList: msg.AtUserIDList, Content: callback.GetContent(msg), } - resp := &cbApi.CallbackBeforeSuperGroupOnlinePushResp{CommonCallbackResp: callbackResp} + resp := &cbApi.CallbackBeforeSuperGroupOnlinePushResp{CommonCallbackResp: &callbackResp} if err := http.CallBackPostReturn(config.Config.Callback.CallbackUrl, constant.CallbackSuperGroupOnlinePushCommand, req, resp, config.Config.Callback.CallbackBeforeSuperGroupOnlinePush.CallbackTimeOut); err != nil { callbackResp.ErrCode = http2.StatusInternalServerError callbackResp.ErrMsg = err.Error() diff --git a/internal/rpc/friend/callback.go b/internal/rpc/friend/callback.go index 1f9be0624..8e75a44b4 100644 --- a/internal/rpc/friend/callback.go +++ b/internal/rpc/friend/callback.go @@ -26,7 +26,7 @@ func callbackBeforeAddFriend(req *pbFriend.AddFriendReq) cbApi.CommonCallbackRes OperationID: req.CommID.OperationID, } resp := &cbApi.CallbackBeforeAddFriendResp{ - CommonCallbackResp: callbackResp, + CommonCallbackResp: &callbackResp, } //utils.CopyStructFields(req, msg.MsgData) defer log.NewDebug(req.CommID.OperationID, utils.GetSelfFuncName(), commonCallbackReq, *resp) diff --git a/internal/rpc/group/callback.go b/internal/rpc/group/callback.go index 73d6f806f..b74c89918 100644 --- a/internal/rpc/group/callback.go +++ b/internal/rpc/group/callback.go @@ -21,7 +21,7 @@ func callbackBeforeCreateGroup(req *pbGroup.CreateGroupReq) cbApi.CommonCallback CallbackCommand: constant.CallbackBeforeCreateGroupCommand, } resp := &cbApi.CallbackBeforeCreateGroupResp{ - CommonCallbackResp: callbackResp, + CommonCallbackResp: &callbackResp, } //utils.CopyStructFields(req, msg.MsgData) defer log.NewDebug(req.OperationID, utils.GetSelfFuncName(), commonCallbackReq, *resp) diff --git a/internal/rpc/msg/callback.go b/internal/rpc/msg/callback.go index ff5529da3..5fae1e133 100644 --- a/internal/rpc/msg/callback.go +++ b/internal/rpc/msg/callback.go @@ -47,7 +47,7 @@ func callbackBeforeSendSingleMsg(msg *pbChat.SendMsgReq) cbApi.CommonCallbackRes RecvID: msg.MsgData.RecvID, } resp := &cbApi.CallbackBeforeSendSingleMsgResp{ - CommonCallbackResp: callbackResp, + CommonCallbackResp: &callbackResp, } //utils.CopyStructFields(req, msg.MsgData) defer log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), req, *resp) @@ -77,7 +77,7 @@ func callbackAfterSendSingleMsg(msg *pbChat.SendMsgReq) cbApi.CommonCallbackResp CommonCallbackReq: commonCallbackReq, RecvID: msg.MsgData.RecvID, } - resp := &cbApi.CallbackAfterSendSingleMsgResp{CommonCallbackResp: callbackResp} + resp := &cbApi.CallbackAfterSendSingleMsgResp{CommonCallbackResp: &callbackResp} defer log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), req, *resp) if err := http.CallBackPostReturn(config.Config.Callback.CallbackUrl, constant.CallbackAfterSendSingleMsgCommand, req, resp, config.Config.Callback.CallbackAfterSendSingleMsg.CallbackTimeOut); err != nil { callbackResp.ErrCode = http2.StatusInternalServerError @@ -99,7 +99,7 @@ func callbackBeforeSendGroupMsg(msg *pbChat.SendMsgReq) cbApi.CommonCallbackResp CommonCallbackReq: commonCallbackReq, GroupID: msg.MsgData.GroupID, } - resp := &cbApi.CallbackBeforeSendGroupMsgResp{CommonCallbackResp: callbackResp} + resp := &cbApi.CallbackBeforeSendGroupMsgResp{CommonCallbackResp: &callbackResp} defer log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), req, *resp) if err := http.CallBackPostReturn(config.Config.Callback.CallbackUrl, constant.CallbackBeforeSendGroupMsgCommand, req, resp, config.Config.Callback.CallbackBeforeSendGroupMsg.CallbackTimeOut); err != nil { callbackResp.ErrCode = http2.StatusInternalServerError @@ -127,7 +127,7 @@ func callbackAfterSendGroupMsg(msg *pbChat.SendMsgReq) cbApi.CommonCallbackResp CommonCallbackReq: commonCallbackReq, GroupID: msg.MsgData.GroupID, } - resp := &cbApi.CallbackAfterSendGroupMsgResp{CommonCallbackResp: callbackResp} + resp := &cbApi.CallbackAfterSendGroupMsgResp{CommonCallbackResp: &callbackResp} defer log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), req, *resp) if err := http.CallBackPostReturn(config.Config.Callback.CallbackUrl, constant.CallbackAfterSendGroupMsgCommand, req, resp, config.Config.Callback.CallbackAfterSendGroupMsg.CallbackTimeOut); err != nil { callbackResp.ErrCode = http2.StatusInternalServerError @@ -148,7 +148,7 @@ func callbackMsgModify(msg *pbChat.SendMsgReq) cbApi.CommonCallbackResp { req := cbApi.CallbackMsgModifyCommandReq{ CommonCallbackReq: commonCallbackReq, } - resp := &cbApi.CallbackMsgModifyCommandResp{CommonCallbackResp: callbackResp} + resp := &cbApi.CallbackMsgModifyCommandResp{CommonCallbackResp: &callbackResp} defer log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), req, *resp) if err := http.CallBackPostReturn(config.Config.Callback.CallbackUrl, constant.CallbackMsgModifyCommand, req, resp, config.Config.Callback.CallbackMsgModify.CallbackTimeOut); err != nil { callbackResp.ErrCode = http2.StatusInternalServerError diff --git a/pkg/call_back_struct/friend.go b/pkg/call_back_struct/friend.go index be2fe322a..4340fdbb2 100644 --- a/pkg/call_back_struct/friend.go +++ b/pkg/call_back_struct/friend.go @@ -9,5 +9,5 @@ type CallbackBeforeAddFriendReq struct { } type CallbackBeforeAddFriendResp struct { - CommonCallbackResp + *CommonCallbackResp } diff --git a/pkg/call_back_struct/group.go b/pkg/call_back_struct/group.go index 850867a62..92d5c77dd 100644 --- a/pkg/call_back_struct/group.go +++ b/pkg/call_back_struct/group.go @@ -10,7 +10,7 @@ type CallbackBeforeCreateGroupReq struct { } type CallbackBeforeCreateGroupResp struct { - CommonCallbackResp + *CommonCallbackResp GroupID *string `json:"groupID"` GroupName *string `json:"groupName"` Notification *string `json:"notification"` diff --git a/pkg/call_back_struct/message.go b/pkg/call_back_struct/message.go index b1a2eb806..b28615030 100644 --- a/pkg/call_back_struct/message.go +++ b/pkg/call_back_struct/message.go @@ -8,7 +8,7 @@ type CallbackBeforeSendSingleMsgReq struct { } type CallbackBeforeSendSingleMsgResp struct { - CommonCallbackResp + *CommonCallbackResp } type CallbackAfterSendSingleMsgReq struct { @@ -17,7 +17,7 @@ type CallbackAfterSendSingleMsgReq struct { } type CallbackAfterSendSingleMsgResp struct { - CommonCallbackResp + *CommonCallbackResp } type CallbackBeforeSendGroupMsgReq struct { @@ -26,7 +26,7 @@ type CallbackBeforeSendGroupMsgReq struct { } type CallbackBeforeSendGroupMsgResp struct { - CommonCallbackResp + *CommonCallbackResp } type CallbackAfterSendGroupMsgReq struct { @@ -35,7 +35,7 @@ type CallbackAfterSendGroupMsgReq struct { } type CallbackAfterSendGroupMsgResp struct { - CommonCallbackResp + *CommonCallbackResp } type CallbackMsgModifyCommandReq struct { @@ -43,7 +43,7 @@ type CallbackMsgModifyCommandReq struct { } type CallbackMsgModifyCommandResp struct { - CommonCallbackResp + *CommonCallbackResp Content *string `json:"content"` RecvID *string `json:"recvID"` GroupID *string `json:"groupID"` diff --git a/pkg/call_back_struct/msg_gateway.go b/pkg/call_back_struct/msg_gateway.go index 5dbf9809b..df3219339 100644 --- a/pkg/call_back_struct/msg_gateway.go +++ b/pkg/call_back_struct/msg_gateway.go @@ -7,7 +7,7 @@ type CallbackUserOnlineReq struct { } type CallbackUserOnlineResp struct { - CommonCallbackResp + *CommonCallbackResp } type CallbackUserOfflineReq struct { @@ -16,7 +16,7 @@ type CallbackUserOfflineReq struct { } type CallbackUserOfflineResp struct { - CommonCallbackResp + *CommonCallbackResp } type CallbackUserKickOffReq struct { @@ -25,5 +25,5 @@ type CallbackUserKickOffReq struct { } type CallbackUserKickOffResp struct { - CommonCallbackResp + *CommonCallbackResp } diff --git a/pkg/call_back_struct/push.go b/pkg/call_back_struct/push.go index b9f89d671..1fa0fbff6 100644 --- a/pkg/call_back_struct/push.go +++ b/pkg/call_back_struct/push.go @@ -15,7 +15,7 @@ type CallbackBeforePushReq struct { } type CallbackBeforePushResp struct { - CommonCallbackResp + *CommonCallbackResp UserIDList []string `json:"userIDList"` OfflinePushInfo *commonPb.OfflinePushInfo `json:"offlinePushInfo"` } @@ -33,7 +33,7 @@ type CallbackBeforeSuperGroupOnlinePushReq struct { } type CallbackBeforeSuperGroupOnlinePushResp struct { - CommonCallbackResp + *CommonCallbackResp UserIDList []string `json:"userIDList"` OfflinePushInfo *commonPb.OfflinePushInfo `json:"offlinePushInfo"` }