system text format changes

This commit is contained in:
Gordon
2021-05-27 11:40:39 +08:00
parent 32d5e1515c
commit 4ff8a75b3f
5 changed files with 32 additions and 5 deletions
+2 -1
View File
@@ -7,6 +7,7 @@ import (
"Open_IM/src/common/log"
pbChat "Open_IM/src/proto/chat"
pbFriend "Open_IM/src/proto/friend"
"Open_IM/src/push/content_struct"
"Open_IM/src/push/logic"
"Open_IM/src/utils"
"context"
@@ -35,7 +36,7 @@ func (s *friendServer) AddFriend(ctx context.Context, req *pbFriend.AddFriendReq
logic.SendMsgByWS(&pbChat.WSToMsgSvrChatMsg{
SendID: senderInfo.UID,
RecvID: receiverInfo.UID,
Content: senderInfo.Name + " asked to add you as a friend",
Content: content_struct.NewContentStructString(0, "", senderInfo.Name+" asked to add you as a friend"),
SendTime: utils.GetCurrentTimestampBySecond(),
MsgFrom: constant.SysMsgType,
ContentType: constant.AddFriendTip,
+2 -1
View File
@@ -7,6 +7,7 @@ import (
"Open_IM/src/common/log"
pbChat "Open_IM/src/proto/chat"
pbFriend "Open_IM/src/proto/friend"
"Open_IM/src/push/content_struct"
"Open_IM/src/push/logic"
"Open_IM/src/utils"
"context"
@@ -45,7 +46,7 @@ func (s *friendServer) AddedFriend(ctx context.Context, req *pbFriend.AddedFrien
logic.SendMsgByWS(&pbChat.WSToMsgSvrChatMsg{
SendID: claims.UID,
RecvID: req.Uid,
Content: senderInfo.Name + " agreed to add you as a friend.",
Content: content_struct.NewContentStructString(0, "", senderInfo.Name+" agreed to add you as a friend."),
SendTime: utils.GetCurrentTimestampBySecond(),
MsgFrom: constant.SysMsgType, //Notification message identification
ContentType: constant.AgreeAddFriendTip, //Add friend flag