message send module changes

This commit is contained in:
Gordon
2021-07-02 14:24:33 +08:00
parent 0ac4dbfa34
commit 509286698f
24 changed files with 388 additions and 229 deletions
-1
View File
@@ -31,7 +31,6 @@ func (rpc *rpcChat) GetNewSeq(_ context.Context, in *pbMsg.GetNewSeqReq) (*pbMsg
}
}
func (rpc *rpcChat) PullMessage(_ context.Context, in *pbMsg.PullMessageReq) (*pbMsg.PullMessageResp, error) {
log.InfoByKv("rpc pullMessage is arriving", in.OperationID, "args", in.String())
resp := new(pbMsg.PullMessageResp)
+3 -1
View File
@@ -50,7 +50,10 @@ func (rpc *rpcChat) UserSendMsg(_ context.Context, pb *pbChat.UserSendMsgReq) (*
pbData.OfflineInfo = pb.OffLineInfo
pbData.Options = pb.Options
pbData.PlatformID = pb.PlatformID
pbData.ClientMsgID = pb.ClientMsgID
pbData.SendID = pb.SendID
pbData.SenderNickName = pb.SenderNickName
pbData.SenderFaceURL = pb.SenderFaceURL
pbData.MsgID = serverMsgID
pbData.OperationID = pb.OperationID
pbData.Token = pb.Token
@@ -136,7 +139,6 @@ func returnMsg(replay *pbChat.UserSendMsgResp, pb *pbChat.UserSendMsgReq, errCod
replay.ErrCode = errCode
replay.ErrMsg = errMsg
replay.ReqIdentifier = pb.ReqIdentifier
replay.MsgIncr = pb.MsgIncr
replay.ClientMsgID = pb.ClientMsgID
replay.ServerMsgID = serverMsgID
replay.SendTime = sendTime
+1 -1
View File
@@ -56,7 +56,7 @@ func (s *friendServer) AddFriendResponse(ctx context.Context, req *pbFriend.AddF
logic.SendMsgByWS(&pbChat.WSToMsgSvrChatMsg{
SendID: claims.UID,
RecvID: req.Uid,
Content: senderInfo.Name + " agreed to add you as a friend.",
Content: content_struct.NewContentStructString(1, "", senderInfo.Name+" agreed to add you as a friend."),
SendTime: utils.GetCurrentTimestampBySecond(),
MsgFrom: constant.UserMsgType, //Notification message identification
ContentType: constant.AcceptFriendApplicationTip, //Add friend flag