mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-08 21:47:17 +08:00
fix: api send messages for notification conversation.
This commit is contained in:
parent
5872493c89
commit
fb9ab25de1
@ -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{}
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user