mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-26 05:02:11 +08:00
chore: msg
This commit is contained in:
parent
542dfd6759
commit
3257e38649
@ -197,6 +197,10 @@ func (m *msgServer) sendMsgSingleChat(ctx context.Context, req *pbmsg.SendMsgReq
|
||||
}
|
||||
|
||||
func (m *msgServer) SendSimpleMsg(ctx context.Context, req *pbmsg.SendSimpleMsgReq) (*pbmsg.SendSimpleMsgResp, error) {
|
||||
user, err := m.UserLocalCache.GetUserInfo(ctx, req.SendID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
msgData := &sdkws.MsgData{
|
||||
SendID: req.SendID,
|
||||
RecvID: req.RecvID,
|
||||
@ -204,11 +208,11 @@ func (m *msgServer) SendSimpleMsg(ctx context.Context, req *pbmsg.SendSimpleMsgR
|
||||
ClientMsgID: GetMsgID(req.SendID),
|
||||
ServerMsgID: GetMsgID(req.SendID),
|
||||
SenderPlatformID: constant.AdminPlatformID,
|
||||
SenderNickname: "",
|
||||
SenderFaceURL: "",
|
||||
SessionType: 0,
|
||||
MsgFrom: 0,
|
||||
ContentType: 0,
|
||||
SenderNickname: user.Nickname,
|
||||
SenderFaceURL: user.FaceURL,
|
||||
SessionType: datautil.If[int32](req.RecvID == "", constant.ReadGroupChatType, constant.SingleChatType),
|
||||
MsgFrom: constant.UserMsgType,
|
||||
ContentType: constant.Text,
|
||||
Content: req.Content,
|
||||
Seq: 0,
|
||||
SendTime: 0,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user