mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-11-05 21:02:11 +08:00
fix: fix tools erros code
This commit is contained in:
parent
10bb10be9e
commit
96121b0ca0
@ -505,7 +505,7 @@ func (p *Pusher) getOfflinePushInfos(conversationID string, msg *sdkws.MsgData)
|
|||||||
case constant.AtText:
|
case constant.AtText:
|
||||||
ac := atContent{}
|
ac := atContent{}
|
||||||
_ = utils.JsonStringToStruct(string(msg.Content), &ac)
|
_ = utils.JsonStringToStruct(string(msg.Content), &ac)
|
||||||
if utils.IsContain(conversationID, ac.AtUserList) {
|
if utils.Contain(conversationID, ac.AtUserList...) {
|
||||||
title = constant.ContentType2PushContent[constant.AtText] + constant.ContentType2PushContent[constant.Common]
|
title = constant.ContentType2PushContent[constant.AtText] + constant.ContentType2PushContent[constant.Common]
|
||||||
} else {
|
} else {
|
||||||
title = constant.ContentType2PushContent[constant.GroupMsg]
|
title = constant.ContentType2PushContent[constant.GroupMsg]
|
||||||
|
|||||||
@ -47,10 +47,10 @@ func (m *msgServer) SendMsg(ctx context.Context, req *pbmsg.SendMsgReq) (resp *p
|
|||||||
case constant.SuperGroupChatType:
|
case constant.SuperGroupChatType:
|
||||||
return m.sendMsgSuperGroupChat(ctx, req)
|
return m.sendMsgSuperGroupChat(ctx, req)
|
||||||
default:
|
default:
|
||||||
return nil, errs.ErrArgs.Wrap("unknown sessionType")
|
return nil, errs.ErrArgs.WrapMsg("unknown sessionType")
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return nil, errs.ErrArgs.Wrap("msgData is nil")
|
return nil, errs.ErrArgs.WrapMsg("msgData is nil")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ func (m *msgServer) setConversationAtInfo(nctx context.Context, msg *sdkws.MsgDa
|
|||||||
ConversationType: msg.SessionType,
|
ConversationType: msg.SessionType,
|
||||||
GroupID: msg.GroupID,
|
GroupID: msg.GroupID,
|
||||||
}
|
}
|
||||||
tagAll := utils.IsContain(constant.AtAllString, msg.AtUserIDList)
|
tagAll := utils.Contain(constant.AtAllString, msg.AtUserIDList...)
|
||||||
if tagAll {
|
if tagAll {
|
||||||
memberUserIDList, err := m.GroupLocalCache.GetGroupMemberIDs(ctx, msg.GroupID)
|
memberUserIDList, err := m.GroupLocalCache.GetGroupMemberIDs(ctx, msg.GroupID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@ -20,10 +20,7 @@ import (
|
|||||||
pbmsg "github.com/OpenIMSDK/protocol/msg"
|
pbmsg "github.com/OpenIMSDK/protocol/msg"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (m *msgServer) GetConversationMaxSeq(
|
func (m *msgServer) GetConversationMaxSeq(ctx context.Context, req *pbmsg.GetConversationMaxSeqReq) (resp *pbmsg.GetConversationMaxSeqResp, err error) {
|
||||||
ctx context.Context,
|
|
||||||
req *pbmsg.GetConversationMaxSeqReq,
|
|
||||||
) (resp *pbmsg.GetConversationMaxSeqResp, err error) {
|
|
||||||
maxSeq, err := m.MsgDatabase.GetMaxSeq(ctx, req.ConversationID)
|
maxSeq, err := m.MsgDatabase.GetMaxSeq(ctx, req.ConversationID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user