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{}
|
data = apistruct.OANotificationElem{}
|
||||||
req.SessionType = constant.NotificationChatType
|
req.SessionType = constant.NotificationChatType
|
||||||
if !authverify.IsManagerUserID(req.SendID) {
|
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:
|
case constant.CustomNotTriggerConversation:
|
||||||
data = apistruct.CustomElem{}
|
data = apistruct.CustomElem{}
|
||||||
|
|||||||
@ -56,7 +56,6 @@ func (c *ConsumerHandler) handleMs2PsChat(ctx context.Context, msg []byte) {
|
|||||||
MsgData: msgFromMQ.MsgData,
|
MsgData: msgFromMQ.MsgData,
|
||||||
ConversationID: msgFromMQ.ConversationID,
|
ConversationID: msgFromMQ.ConversationID,
|
||||||
}
|
}
|
||||||
log.ZDebug(ctx, "push msg", "msg", pbData.String())
|
|
||||||
sec := msgFromMQ.MsgData.SendTime / 1000
|
sec := msgFromMQ.MsgData.SendTime / 1000
|
||||||
nowSec := utils.GetCurrentTimestampBySecond()
|
nowSec := utils.GetCurrentTimestampBySecond()
|
||||||
log.ZDebug(ctx, "push msg", "msg", pbData.String(), "sec", sec, "nowSec", nowSec)
|
log.ZDebug(ctx, "push msg", "msg", pbData.String(), "sec", sec, "nowSec", nowSec)
|
||||||
|
|||||||
@ -41,7 +41,7 @@ type SendMsgReq struct {
|
|||||||
type BatchSendMsgReq struct {
|
type BatchSendMsgReq struct {
|
||||||
SendMsg
|
SendMsg
|
||||||
IsSendAll bool `json:"isSendAll"`
|
IsSendAll bool `json:"isSendAll"`
|
||||||
RecvIDs []string `json:"recvIDs"`
|
RecvIDs []string `json:"recvIDs" binding:"required"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type BatchSendMsgResp struct {
|
type BatchSendMsgResp struct {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user