diff --git a/internal/api/msg.go b/internal/api/msg.go index 47aa84031..fefe2218d 100644 --- a/internal/api/msg.go +++ b/internal/api/msg.go @@ -173,7 +173,8 @@ func (m *MessageApi) getSendMsgReq(c *gin.Context, req apistruct.SendMsg) (sendM data = apistruct.OANotificationElem{} req.SessionType = constant.NotificationChatType if !authverify.IsManagerUserID(req.SendID) { - return nil, errs.ErrNoPermission.Wrap("only app manager can send message") + return nil, errs.ErrNoPermission. + Wrap("only app manager can as sender send OANotificationElem") } case constant.CustomNotTriggerConversation: data = apistruct.CustomElem{} diff --git a/internal/push/push_handler.go b/internal/push/push_handler.go index 9efa15855..a1a9ff08e 100644 --- a/internal/push/push_handler.go +++ b/internal/push/push_handler.go @@ -56,7 +56,6 @@ func (c *ConsumerHandler) handleMs2PsChat(ctx context.Context, msg []byte) { MsgData: msgFromMQ.MsgData, ConversationID: msgFromMQ.ConversationID, } - log.ZDebug(ctx, "push msg", "msg", pbData.String()) sec := msgFromMQ.MsgData.SendTime / 1000 nowSec := utils.GetCurrentTimestampBySecond() log.ZDebug(ctx, "push msg", "msg", pbData.String(), "sec", sec, "nowSec", nowSec) diff --git a/pkg/apistruct/manage.go b/pkg/apistruct/manage.go index 7d30d2151..1238b4757 100644 --- a/pkg/apistruct/manage.go +++ b/pkg/apistruct/manage.go @@ -41,7 +41,7 @@ type SendMsgReq struct { type BatchSendMsgReq struct { SendMsg IsSendAll bool `json:"isSendAll"` - RecvIDs []string `json:"recvIDs"` + RecvIDs []string `json:"recvIDs" binding:"required"` } type BatchSendMsgResp struct {