diff --git a/src/api/auth/user_token.go b/src/api/auth/user_token.go index f4bcfb6ac..342945cf0 100644 --- a/src/api/auth/user_token.go +++ b/src/api/auth/user_token.go @@ -33,6 +33,7 @@ func UserToken(c *gin.Context) { params := paramsUserToken{} if err := c.BindJSON(¶ms); err != nil { + log.Error("", "", params.UID, params.Platform, params.Secret) c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": err.Error()}) return } diff --git a/src/api/chat/newest_seq.go b/src/api/chat/newest_seq.go index be6298c36..f44aaf3f6 100644 --- a/src/api/chat/newest_seq.go +++ b/src/api/chat/newest_seq.go @@ -31,7 +31,6 @@ func UserNewestSeq(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"}) return } - pbData := pbMsg.GetNewSeqReq{} pbData.UserID = params.SendID pbData.OperationID = params.OperationID diff --git a/src/api/chat/pull_msg.go b/src/api/chat/pull_msg.go index d2c25b0e3..b601f224c 100644 --- a/src/api/chat/pull_msg.go +++ b/src/api/chat/pull_msg.go @@ -16,7 +16,6 @@ type paramsUserPullMsg struct { ReqIdentifier *int `json:"reqIdentifier" binding:"required"` SendID string `json:"sendID" binding:"required"` OperationID string `json:"operationID" binding:"required"` - MsgIncr *int `json:"msgIncr" binding:"required"` Data struct { SeqBegin *int64 `json:"seqBegin" binding:"required"` SeqEnd *int64 `json:"seqEnd" binding:"required"` @@ -35,7 +34,6 @@ func UserPullMsg(c *gin.Context) { c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "token validate err"}) return } - pbData := pbChat.PullMessageReq{} pbData.UserID = params.SendID pbData.OperationID = params.OperationID @@ -67,7 +65,6 @@ func UserPullMsg(c *gin.Context) { c.JSON(http.StatusOK, gin.H{ "errCode": reply.ErrCode, "errMsg": reply.ErrMsg, - "msgIncr": *params.MsgIncr, "reqIdentifier": *params.ReqIdentifier, "data": msg, }) diff --git a/src/api/chat/send_msg.go b/src/api/chat/send_msg.go index 50978dae1..1ed48f3e1 100644 --- a/src/api/chat/send_msg.go +++ b/src/api/chat/send_msg.go @@ -14,12 +14,13 @@ import ( ) type paramsUserSendMsg struct { - ReqIdentifier int32 `json:"reqIdentifier" binding:"required"` - PlatformID int32 `json:"platformID" binding:"required"` - SendID string `json:"sendID" binding:"required"` - OperationID string `json:"operationID" binding:"required"` - MsgIncr int32 `json:"msgIncr"` - Data struct { + ReqIdentifier int32 `json:"reqIdentifier" binding:"required"` + PlatformID int32 `json:"platformID" binding:"required"` + SendID string `json:"sendID" binding:"required"` + SenderNickName string `json:"senderNickName" binding:"required"` + SenderFaceURL string `json:"senderFaceUrl"` + OperationID string `json:"operationID" binding:"required"` + Data struct { SessionType int32 `json:"sessionType" binding:"required"` MsgFrom int32 `json:"msgFrom" binding:"required"` ContentType int32 `json:"contentType" binding:"required"` @@ -35,22 +36,23 @@ type paramsUserSendMsg struct { func newUserSendMsgReq(token string, params *paramsUserSendMsg) *pbChat.UserSendMsgReq { pbData := pbChat.UserSendMsgReq{ - ReqIdentifier: params.ReqIdentifier, - Token: token, - SendID: params.SendID, - OperationID: params.OperationID, - MsgIncr: params.MsgIncr, - PlatformID: params.PlatformID, - SessionType: params.Data.SessionType, - MsgFrom: params.Data.MsgFrom, - ContentType: params.Data.ContentType, - RecvID: params.Data.RecvID, - ForceList: params.Data.ForceList, - Content: params.Data.Content, - Options: utils.MapToJsonString(params.Data.Options), - ClientMsgID: params.Data.ClientMsgID, - OffLineInfo: utils.MapToJsonString(params.Data.OffLineInfo), - Ex: utils.MapToJsonString(params.Data.Ex), + ReqIdentifier: params.ReqIdentifier, + Token: token, + SendID: params.SendID, + SenderNickName: params.SenderNickName, + SenderFaceURL: params.SenderFaceURL, + OperationID: params.OperationID, + PlatformID: params.PlatformID, + SessionType: params.Data.SessionType, + MsgFrom: params.Data.MsgFrom, + ContentType: params.Data.ContentType, + RecvID: params.Data.RecvID, + ForceList: params.Data.ForceList, + Content: params.Data.Content, + Options: utils.MapToJsonString(params.Data.Options), + ClientMsgID: params.Data.ClientMsgID, + OffLineInfo: utils.MapToJsonString(params.Data.OffLineInfo), + Ex: utils.MapToJsonString(params.Data.Ex), } return &pbData } @@ -85,7 +87,6 @@ func UserSendMsg(c *gin.Context) { c.JSON(http.StatusOK, gin.H{ "errCode": reply.ErrCode, "errMsg": reply.ErrMsg, - "msgIncr": reply.MsgIncr, "reqIdentifier": reply.ReqIdentifier, "data": gin.H{ "clientMsgID": reply.ClientMsgID, diff --git a/src/common/constant/constant.go b/src/common/constant/constant.go index ed59623ee..6b640efcd 100644 --- a/src/common/constant/constant.go +++ b/src/common/constant/constant.go @@ -29,6 +29,7 @@ const ( Voice = 103 Video = 104 File = 105 + AtText = 106 SyncSenderMsg = 108 //SysRelated diff --git a/src/common/db/mongoModel.go b/src/common/db/mongoModel.go index 473d9116b..c636c6bad 100644 --- a/src/common/db/mongoModel.go +++ b/src/common/db/mongoModel.go @@ -51,6 +51,9 @@ func (d *DataBases) GetUserChat(uid string, seqBegin, seqEnd int64) (SingleMsg [ temp.Content = pChat.Content temp.ContentType = pChat.ContentType temp.SenderPlatformID = pChat.PlatformID + temp.ClientMsgID = pChat.ClientMsgID + temp.SenderFaceURL = pChat.SenderFaceURL + temp.SenderNickName = pChat.SenderNickName if pChat.RecvSeq > MaxSeq { MaxSeq = pChat.RecvSeq } @@ -101,7 +104,6 @@ func (d *DataBases) SaveUserChat(uid string, sendTime int64, m proto.Message) er return err } } else { - err = c.Update(bson.M{"uid": uid}, bson.M{"$push": bson.M{"msg": sMsg}}) if err != nil { return err diff --git a/src/msg_gateway/gate/logic.go b/src/msg_gateway/gate/logic.go index 770592b2a..f577439cc 100644 --- a/src/msg_gateway/gate/logic.go +++ b/src/msg_gateway/gate/logic.go @@ -155,7 +155,6 @@ func (ws *WServer) sendMsgReq(conn *websocket.Conn, m *Req) { Token: m.Token, SendID: m.SendID, OperationID: m.OperationID, - MsgIncr: m.MsgIncr, PlatformID: data.PlatformID, SessionType: data.SessionType, MsgFrom: data.MsgFrom, diff --git a/src/msg_gateway/gate/rpc_server.go b/src/msg_gateway/gate/rpc_server.go index e1f564934..35f7938af 100644 --- a/src/msg_gateway/gate/rpc_server.go +++ b/src/msg_gateway/gate/rpc_server.go @@ -65,11 +65,13 @@ func (r *RPCServer) MsgToUser(_ context.Context, in *pbRelay.MsgToUserReq) (*pbR msg["msgFrom"] = in.MsgFrom msg["contentType"] = in.ContentType msg["sessionType"] = in.SessionType + msg["senderNickName"] = in.SenderNickName + msg["senderFaceUrl"] = in.SenderFaceURL + msg["clientMsgID"] = in.ClientMsgID msg["serverMsgID"] = in.ServerMsgID msg["content"] = in.Content msg["seq"] = in.RecvSeq msg["sendTime"] = in.SendTime - msg["isEmphasize"] = in.IsEmphasize msg["senderPlatformID"] = in.PlatformID mReply["data"] = msg bMsg, _ := json.Marshal(mReply) diff --git a/src/msg_transfer/logic/history_msg_handler.go b/src/msg_transfer/logic/history_msg_handler.go index 8ef4098ce..cdf8f7721 100644 --- a/src/msg_transfer/logic/history_msg_handler.go +++ b/src/msg_transfer/logic/history_msg_handler.go @@ -7,6 +7,7 @@ import ( "Open_IM/src/common/log" pbMsg "Open_IM/src/proto/chat" pbPush "Open_IM/src/proto/push" + "Open_IM/src/push/content_struct" "Open_IM/src/utils" "context" "github.com/Shopify/sarama" @@ -41,12 +42,16 @@ func (mc *HistoryConsumerHandler) handleChatWs2Mongo(msg []byte, msgKey string) } pbSaveData := pbMsg.MsgSvrToPushSvrChatMsg{} pbSaveData.SendID = pbData.SendID + pbSaveData.SenderNickName = pbData.SenderNickName + pbSaveData.SenderFaceURL = pbData.SenderFaceURL + pbSaveData.ClientMsgID = pbData.ClientMsgID pbSaveData.SendTime = pbData.SendTime pbSaveData.Content = pbData.Content pbSaveData.MsgFrom = pbData.MsgFrom pbSaveData.ContentType = pbData.ContentType pbSaveData.SessionType = pbData.SessionType pbSaveData.MsgID = pbData.MsgID + pbSaveData.OperationID = pbData.OperationID pbSaveData.RecvID = pbData.RecvID pbSaveData.PlatformID = pbData.PlatformID Options := utils.JsonStringToMap(pbData.Options) @@ -82,12 +87,20 @@ func (mc *HistoryConsumerHandler) handleChatWs2Mongo(msg []byte, msgKey string) } else if pbData.SessionType == constant.GroupChatType { log.Info("", "", "msg_transfer chat type = GroupChatType") uidAndGroupID := strings.Split(pbData.RecvID, " ") + if pbData.ContentType == constant.AtText { + atContent := content_struct.AtTextContent{ + Text: pbData.Content, + AtUserList: pbData.ForceList, + } + if utils.IsContain(uidAndGroupID[0], pbData.ForceList) { + atContent.IsAtSelf = true + } + pbSaveData.Content = utils.StructToJsonString(atContent) + } + saveUserChat(uidAndGroupID[0], &pbSaveData) pbSaveData.Options = pbData.Options pbSaveData.OfflineInfo = pbData.OfflineInfo - if utils.IsContain(uidAndGroupID[0], pbData.ForceList) { - pbSaveData.IsEmphasize = true - } sendMessageToPush(&pbSaveData) log.InfoByKv("msg_transfer handle topic success...", "", "") } else { @@ -115,7 +128,9 @@ func sendMessageToPush(message *pbMsg.MsgSvrToPushSvrChatMsg) { msg.SessionType = message.SessionType msg.RecvID = message.RecvID msg.SendID = message.SendID - msg.IsEmphasize = message.IsEmphasize + msg.SenderNickName = message.SenderNickName + msg.SenderFaceURL = message.SenderFaceURL + msg.ClientMsgID = message.ClientMsgID msg.MsgFrom = message.MsgFrom msg.Options = message.Options msg.RecvSeq = message.RecvSeq diff --git a/src/proto/auto_proto.sh b/src/proto/auto_proto.sh index d287be622..309186817 100644 --- a/src/proto/auto_proto.sh +++ b/src/proto/auto_proto.sh @@ -5,7 +5,7 @@ source ./proto_dir.cfg for ((i = 0; i < ${#all_proto[*]}; i++)); do proto=${all_proto[$i]} protoc --go_out=plugins=grpc:. $proto - s=$(echo $proto | sed 's/ //g') + s=`echo $proto | sed 's/ //g'` v=${s//proto/pb.go} protoc-go-inject-tag -input=./$v echo "protoc --go_out=plugins=grpc:." $proto diff --git a/src/proto/chat/chat.pb.go b/src/proto/chat/chat.pb.go index cf7edee6f..d320ce195 100644 --- a/src/proto/chat/chat.pb.go +++ b/src/proto/chat/chat.pb.go @@ -30,15 +30,18 @@ type WSToMsgSvrChatMsg struct { Content string `protobuf:"bytes,3,opt,name=Content,proto3" json:"Content,omitempty"` SendTime int64 `protobuf:"varint,4,opt,name=SendTime,proto3" json:"SendTime,omitempty"` MsgFrom int32 `protobuf:"varint,5,opt,name=MsgFrom,proto3" json:"MsgFrom,omitempty"` - ContentType int32 `protobuf:"varint,6,opt,name=ContentType,proto3" json:"ContentType,omitempty"` - SessionType int32 `protobuf:"varint,7,opt,name=SessionType,proto3" json:"SessionType,omitempty"` - OperationID string `protobuf:"bytes,8,opt,name=OperationID,proto3" json:"OperationID,omitempty"` - MsgID string `protobuf:"bytes,9,opt,name=MsgID,proto3" json:"MsgID,omitempty"` - Token string `protobuf:"bytes,10,opt,name=Token,proto3" json:"Token,omitempty"` - OfflineInfo string `protobuf:"bytes,11,opt,name=OfflineInfo,proto3" json:"OfflineInfo,omitempty"` - Options string `protobuf:"bytes,12,opt,name=Options,proto3" json:"Options,omitempty"` - PlatformID int32 `protobuf:"varint,13,opt,name=PlatformID,proto3" json:"PlatformID,omitempty"` - ForceList []string `protobuf:"bytes,14,rep,name=ForceList,proto3" json:"ForceList,omitempty"` + SenderNickName string `protobuf:"bytes,6,opt,name=SenderNickName,proto3" json:"SenderNickName,omitempty"` + SenderFaceURL string `protobuf:"bytes,7,opt,name=SenderFaceURL,proto3" json:"SenderFaceURL,omitempty"` + ContentType int32 `protobuf:"varint,8,opt,name=ContentType,proto3" json:"ContentType,omitempty"` + SessionType int32 `protobuf:"varint,9,opt,name=SessionType,proto3" json:"SessionType,omitempty"` + OperationID string `protobuf:"bytes,10,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + MsgID string `protobuf:"bytes,11,opt,name=MsgID,proto3" json:"MsgID,omitempty"` + Token string `protobuf:"bytes,12,opt,name=Token,proto3" json:"Token,omitempty"` + OfflineInfo string `protobuf:"bytes,13,opt,name=OfflineInfo,proto3" json:"OfflineInfo,omitempty"` + Options string `protobuf:"bytes,14,opt,name=Options,proto3" json:"Options,omitempty"` + PlatformID int32 `protobuf:"varint,15,opt,name=PlatformID,proto3" json:"PlatformID,omitempty"` + ForceList []string `protobuf:"bytes,16,rep,name=ForceList,proto3" json:"ForceList,omitempty"` + ClientMsgID string `protobuf:"bytes,17,opt,name=ClientMsgID,proto3" json:"ClientMsgID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -104,6 +107,20 @@ func (m *WSToMsgSvrChatMsg) GetMsgFrom() int32 { return 0 } +func (m *WSToMsgSvrChatMsg) GetSenderNickName() string { + if m != nil { + return m.SenderNickName + } + return "" +} + +func (m *WSToMsgSvrChatMsg) GetSenderFaceURL() string { + if m != nil { + return m.SenderFaceURL + } + return "" +} + func (m *WSToMsgSvrChatMsg) GetContentType() int32 { if m != nil { return m.ContentType @@ -167,6 +184,13 @@ func (m *WSToMsgSvrChatMsg) GetForceList() []string { return nil } +func (m *WSToMsgSvrChatMsg) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" +} + type MsgSvrToPushSvrChatMsg struct { SendID string `protobuf:"bytes,1,opt,name=SendID,proto3" json:"SendID,omitempty"` RecvID string `protobuf:"bytes,2,opt,name=RecvID,proto3" json:"RecvID,omitempty"` @@ -174,14 +198,16 @@ type MsgSvrToPushSvrChatMsg struct { RecvSeq int64 `protobuf:"varint,4,opt,name=RecvSeq,proto3" json:"RecvSeq,omitempty"` SendTime int64 `protobuf:"varint,5,opt,name=SendTime,proto3" json:"SendTime,omitempty"` MsgFrom int32 `protobuf:"varint,6,opt,name=MsgFrom,proto3" json:"MsgFrom,omitempty"` - ContentType int32 `protobuf:"varint,7,opt,name=ContentType,proto3" json:"ContentType,omitempty"` - SessionType int32 `protobuf:"varint,8,opt,name=SessionType,proto3" json:"SessionType,omitempty"` - OperationID string `protobuf:"bytes,9,opt,name=OperationID,proto3" json:"OperationID,omitempty"` - MsgID string `protobuf:"bytes,10,opt,name=MsgID,proto3" json:"MsgID,omitempty"` - OfflineInfo string `protobuf:"bytes,11,opt,name=OfflineInfo,proto3" json:"OfflineInfo,omitempty"` - Options string `protobuf:"bytes,12,opt,name=Options,proto3" json:"Options,omitempty"` - PlatformID int32 `protobuf:"varint,13,opt,name=PlatformID,proto3" json:"PlatformID,omitempty"` - IsEmphasize bool `protobuf:"varint,14,opt,name=IsEmphasize,proto3" json:"IsEmphasize,omitempty"` + SenderNickName string `protobuf:"bytes,7,opt,name=SenderNickName,proto3" json:"SenderNickName,omitempty"` + SenderFaceURL string `protobuf:"bytes,8,opt,name=SenderFaceURL,proto3" json:"SenderFaceURL,omitempty"` + ContentType int32 `protobuf:"varint,9,opt,name=ContentType,proto3" json:"ContentType,omitempty"` + SessionType int32 `protobuf:"varint,10,opt,name=SessionType,proto3" json:"SessionType,omitempty"` + OperationID string `protobuf:"bytes,11,opt,name=OperationID,proto3" json:"OperationID,omitempty"` + MsgID string `protobuf:"bytes,12,opt,name=MsgID,proto3" json:"MsgID,omitempty"` + OfflineInfo string `protobuf:"bytes,13,opt,name=OfflineInfo,proto3" json:"OfflineInfo,omitempty"` + Options string `protobuf:"bytes,14,opt,name=Options,proto3" json:"Options,omitempty"` + PlatformID int32 `protobuf:"varint,15,opt,name=PlatformID,proto3" json:"PlatformID,omitempty"` + ClientMsgID string `protobuf:"bytes,16,opt,name=ClientMsgID,proto3" json:"ClientMsgID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -254,6 +280,20 @@ func (m *MsgSvrToPushSvrChatMsg) GetMsgFrom() int32 { return 0 } +func (m *MsgSvrToPushSvrChatMsg) GetSenderNickName() string { + if m != nil { + return m.SenderNickName + } + return "" +} + +func (m *MsgSvrToPushSvrChatMsg) GetSenderFaceURL() string { + if m != nil { + return m.SenderFaceURL + } + return "" +} + func (m *MsgSvrToPushSvrChatMsg) GetContentType() int32 { if m != nil { return m.ContentType @@ -303,11 +343,11 @@ func (m *MsgSvrToPushSvrChatMsg) GetPlatformID() int32 { return 0 } -func (m *MsgSvrToPushSvrChatMsg) GetIsEmphasize() bool { +func (m *MsgSvrToPushSvrChatMsg) GetClientMsgID() string { if m != nil { - return m.IsEmphasize + return m.ClientMsgID } - return false + return "" } type PullMessageReq struct { @@ -621,7 +661,13 @@ type MsgFormat struct { // @inject_tag: json:"sendTime" SendTime int64 `protobuf:"varint,8,opt,name=SendTime,proto3" json:"sendTime"` // @inject_tag: json:"senderPlatformID" - SenderPlatformID int32 `protobuf:"varint,9,opt,name=SenderPlatformID,proto3" json:"senderPlatformID"` + SenderPlatformID int32 `protobuf:"varint,9,opt,name=SenderPlatformID,proto3" json:"senderPlatformID"` + // @inject_tag: json:"senderNickName" + SenderNickName string `protobuf:"bytes,10,opt,name=SenderNickName,proto3" json:"senderNickName"` + // @inject_tag: json:"senderFaceUrl" + SenderFaceURL string `protobuf:"bytes,11,opt,name=SenderFaceURL,proto3" json:"senderFaceUrl"` + // @inject_tag: json:"clientMsgID" + ClientMsgID string `protobuf:"bytes,12,opt,name=ClientMsgID,proto3" json:"clientMsgID"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -715,23 +761,45 @@ func (m *MsgFormat) GetSenderPlatformID() int32 { return 0 } +func (m *MsgFormat) GetSenderNickName() string { + if m != nil { + return m.SenderNickName + } + return "" +} + +func (m *MsgFormat) GetSenderFaceURL() string { + if m != nil { + return m.SenderFaceURL + } + return "" +} + +func (m *MsgFormat) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" +} + type UserSendMsgReq struct { ReqIdentifier int32 `protobuf:"varint,1,opt,name=ReqIdentifier,proto3" json:"ReqIdentifier,omitempty"` Token string `protobuf:"bytes,2,opt,name=Token,proto3" json:"Token,omitempty"` SendID string `protobuf:"bytes,3,opt,name=SendID,proto3" json:"SendID,omitempty"` OperationID string `protobuf:"bytes,4,opt,name=OperationID,proto3" json:"OperationID,omitempty"` - MsgIncr int32 `protobuf:"varint,5,opt,name=MsgIncr,proto3" json:"MsgIncr,omitempty"` - PlatformID int32 `protobuf:"varint,6,opt,name=PlatformID,proto3" json:"PlatformID,omitempty"` - SessionType int32 `protobuf:"varint,7,opt,name=SessionType,proto3" json:"SessionType,omitempty"` - MsgFrom int32 `protobuf:"varint,8,opt,name=MsgFrom,proto3" json:"MsgFrom,omitempty"` - ContentType int32 `protobuf:"varint,9,opt,name=ContentType,proto3" json:"ContentType,omitempty"` - RecvID string `protobuf:"bytes,10,opt,name=RecvID,proto3" json:"RecvID,omitempty"` - ForceList []string `protobuf:"bytes,11,rep,name=ForceList,proto3" json:"ForceList,omitempty"` - Content string `protobuf:"bytes,12,opt,name=Content,proto3" json:"Content,omitempty"` - Options string `protobuf:"bytes,13,opt,name=Options,proto3" json:"Options,omitempty"` - ClientMsgID string `protobuf:"bytes,14,opt,name=ClientMsgID,proto3" json:"ClientMsgID,omitempty"` - OffLineInfo string `protobuf:"bytes,15,opt,name=OffLineInfo,proto3" json:"OffLineInfo,omitempty"` - Ex string `protobuf:"bytes,16,opt,name=Ex,proto3" json:"Ex,omitempty"` + SenderNickName string `protobuf:"bytes,5,opt,name=SenderNickName,proto3" json:"SenderNickName,omitempty"` + SenderFaceURL string `protobuf:"bytes,6,opt,name=SenderFaceURL,proto3" json:"SenderFaceURL,omitempty"` + PlatformID int32 `protobuf:"varint,7,opt,name=PlatformID,proto3" json:"PlatformID,omitempty"` + SessionType int32 `protobuf:"varint,8,opt,name=SessionType,proto3" json:"SessionType,omitempty"` + MsgFrom int32 `protobuf:"varint,9,opt,name=MsgFrom,proto3" json:"MsgFrom,omitempty"` + ContentType int32 `protobuf:"varint,10,opt,name=ContentType,proto3" json:"ContentType,omitempty"` + RecvID string `protobuf:"bytes,11,opt,name=RecvID,proto3" json:"RecvID,omitempty"` + ForceList []string `protobuf:"bytes,12,rep,name=ForceList,proto3" json:"ForceList,omitempty"` + Content string `protobuf:"bytes,13,opt,name=Content,proto3" json:"Content,omitempty"` + Options string `protobuf:"bytes,14,opt,name=Options,proto3" json:"Options,omitempty"` + ClientMsgID string `protobuf:"bytes,15,opt,name=ClientMsgID,proto3" json:"ClientMsgID,omitempty"` + OffLineInfo string `protobuf:"bytes,16,opt,name=OffLineInfo,proto3" json:"OffLineInfo,omitempty"` + Ex string `protobuf:"bytes,17,opt,name=Ex,proto3" json:"Ex,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -790,11 +858,18 @@ func (m *UserSendMsgReq) GetOperationID() string { return "" } -func (m *UserSendMsgReq) GetMsgIncr() int32 { +func (m *UserSendMsgReq) GetSenderNickName() string { if m != nil { - return m.MsgIncr + return m.SenderNickName } - return 0 + return "" +} + +func (m *UserSendMsgReq) GetSenderFaceURL() string { + if m != nil { + return m.SenderFaceURL + } + return "" } func (m *UserSendMsgReq) GetPlatformID() int32 { @@ -878,7 +953,6 @@ type UserSendMsgResp struct { ErrCode int32 `protobuf:"varint,1,opt,name=ErrCode,proto3" json:"ErrCode,omitempty"` ErrMsg string `protobuf:"bytes,2,opt,name=ErrMsg,proto3" json:"ErrMsg,omitempty"` ReqIdentifier int32 `protobuf:"varint,3,opt,name=ReqIdentifier,proto3" json:"ReqIdentifier,omitempty"` - MsgIncr int32 `protobuf:"varint,4,opt,name=MsgIncr,proto3" json:"MsgIncr,omitempty"` SendTime int64 `protobuf:"varint,5,opt,name=SendTime,proto3" json:"SendTime,omitempty"` ServerMsgID string `protobuf:"bytes,6,opt,name=ServerMsgID,proto3" json:"ServerMsgID,omitempty"` ClientMsgID string `protobuf:"bytes,7,opt,name=ClientMsgID,proto3" json:"ClientMsgID,omitempty"` @@ -933,13 +1007,6 @@ func (m *UserSendMsgResp) GetReqIdentifier() int32 { return 0 } -func (m *UserSendMsgResp) GetMsgIncr() int32 { - if m != nil { - return m.MsgIncr - } - return 0 -} - func (m *UserSendMsgResp) GetSendTime() int64 { if m != nil { return m.SendTime @@ -979,62 +1046,65 @@ func init() { } var fileDescriptor_767a49518b351716 = []byte{ - // 874 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x6e, 0xeb, 0x44, - 0x18, 0x95, 0xe3, 0xc4, 0x89, 0xbf, 0xfc, 0xf5, 0x8e, 0x2e, 0x65, 0x54, 0x21, 0x64, 0x59, 0x20, - 0x45, 0x2c, 0x8a, 0x74, 0xd9, 0x5c, 0x81, 0xc4, 0xe2, 0x36, 0x69, 0xb1, 0x74, 0xcd, 0xad, 0xec, - 0x20, 0x24, 0x76, 0x6e, 0x32, 0x71, 0x2c, 0x12, 0xdb, 0x99, 0x71, 0x4b, 0x61, 0xc1, 0x1b, 0xf0, - 0x0c, 0xbc, 0x00, 0x0f, 0xc1, 0x83, 0xb0, 0x63, 0xc5, 0x5b, 0xa0, 0x99, 0xb1, 0xe3, 0xb1, 0x9d, - 0x26, 0x52, 0xa5, 0x6e, 0xa2, 0x9c, 0x33, 0x3f, 0x99, 0x39, 0xe7, 0xfb, 0xce, 0x04, 0xc6, 0x8b, - 0x75, 0x90, 0x7d, 0xc9, 0x3f, 0x2e, 0x53, 0x9a, 0x64, 0x09, 0x32, 0xd2, 0xbb, 0xab, 0x75, 0x90, - 0xd9, 0x7f, 0xea, 0xf0, 0xea, 0x47, 0x7f, 0x9e, 0xb8, 0x2c, 0xf4, 0x1f, 0x28, 0xa7, 0x5c, 0x16, - 0xa2, 0x73, 0x30, 0x7c, 0x12, 0x2f, 0x9d, 0x29, 0xd6, 0x2c, 0x6d, 0x62, 0x7a, 0x39, 0xe2, 0xbc, - 0x47, 0x16, 0x0f, 0xce, 0x14, 0xb7, 0x24, 0x2f, 0x11, 0xc2, 0xd0, 0xbd, 0x4a, 0xe2, 0x8c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, 0x29, 0x40, 0xa5, 0x14, 0x2a, 0xef, 0x4c, 0xbf, 0xf6, 0xce, 0xa8, 0x56, 0x0e, - 0x1a, 0x8f, 0x43, 0x11, 0x97, 0xc3, 0x6a, 0x5c, 0xf2, 0xb3, 0x6c, 0x22, 0x12, 0x67, 0xb2, 0x40, - 0x46, 0x52, 0x23, 0x85, 0xca, 0xc3, 0xf8, 0x7d, 0x11, 0xc6, 0xe3, 0x7d, 0x18, 0x17, 0x14, 0xef, - 0x8a, 0xd9, 0x23, 0x3e, 0x93, 0x5d, 0x31, 0x7b, 0xb4, 0xff, 0xd5, 0x60, 0x5c, 0xb1, 0xf7, 0x59, - 0xdd, 0xd8, 0xa8, 0x08, 0xfd, 0x50, 0x45, 0x28, 0x0e, 0xb6, 0xab, 0x0e, 0x1e, 0x7b, 0xf6, 0x6a, - 0x6d, 0x61, 0x34, 0xdb, 0xa2, 0xa6, 0x4b, 0xb7, 0xa1, 0xcb, 0x9b, 0xbf, 0x35, 0x68, 0xf3, 0x6e, - 0x47, 0x6f, 0xc1, 0xdc, 0x27, 0x0f, 0x2a, 0x43, 0x4f, 0x89, 0xb5, 0x8b, 0x8f, 0x0e, 0xb0, 0x2c, - 0x45, 0xdf, 0x42, 0x5f, 0x09, 0x7a, 0x74, 0x5e, 0xcc, 0xaa, 0x3e, 0x3f, 0x17, 0x1f, 0x1f, 0xe4, - 0xe5, 0x7a, 0x45, 0xe7, 0x72, 0x7d, 0xb5, 0xb7, 0xca, 0xf5, 0x35, 0x53, 0xde, 0x0d, 0x7f, 0xea, - 0xf3, 0x3f, 0x94, 0xdf, 0xc8, 0xe1, 0x3b, 0x43, 0xfc, 0xb1, 0xfc, 0xea, 0xff, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x1f, 0x48, 0xc5, 0x48, 0x6b, 0x0a, 0x00, 0x00, + // 919 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0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0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/src/proto/chat/chat.proto b/src/proto/chat/chat.proto index a3e278743..3aedc42d1 100644 --- a/src/proto/chat/chat.proto +++ b/src/proto/chat/chat.proto @@ -8,15 +8,19 @@ message WSToMsgSvrChatMsg{ string Content = 3; int64 SendTime = 4; int32 MsgFrom = 5; - int32 ContentType = 6; - int32 SessionType = 7; - string OperationID = 8; - string MsgID = 9; - string Token = 10; - string OfflineInfo =11; - string Options = 12; - int32 PlatformID =13; - repeated string ForceList = 14; + string SenderNickName = 6; + string SenderFaceURL = 7; + int32 ContentType = 8; + int32 SessionType = 9; + string OperationID = 10; + string MsgID = 11; + string Token = 12; + string OfflineInfo =13; + string Options = 14; + int32 PlatformID =15; + repeated string ForceList = 16; + string ClientMsgID = 17; + } @@ -27,14 +31,17 @@ message MsgSvrToPushSvrChatMsg { int64 RecvSeq = 4; int64 SendTime = 5; int32 MsgFrom = 6; - int32 ContentType = 7; - int32 SessionType = 8; - string OperationID = 9; - string MsgID = 10; - string OfflineInfo = 11; - string Options =12; - int32 PlatformID =13; - bool IsEmphasize = 14; + string SenderNickName = 7; + string SenderFaceURL = 8; + int32 ContentType = 9; + int32 SessionType = 10; + string OperationID = 11; + string MsgID = 12; + string OfflineInfo = 13; + string Options =14; + int32 PlatformID =15; + string ClientMsgID = 16; + } message PullMessageReq { @@ -86,6 +93,12 @@ message MsgFormat{ int64 SendTime = 8; // @inject_tag: json:"senderPlatformID" int32 SenderPlatformID = 9; + // @inject_tag: json:"senderNickName" + string SenderNickName = 10; + // @inject_tag: json:"senderFaceUrl" + string SenderFaceURL = 11; + // @inject_tag: json:"clientMsgID" + string ClientMsgID = 12; } message UserSendMsgReq { @@ -94,18 +107,19 @@ message UserSendMsgReq { string Token = 2; string SendID = 3; string OperationID = 4; - int32 MsgIncr = 5; - int32 PlatformID = 6; - int32 SessionType = 7; - int32 MsgFrom = 8; - int32 ContentType = 9; - string RecvID = 10; - repeated string ForceList = 11; - string Content = 12; - string Options = 13; - string ClientMsgID = 14; - string OffLineInfo = 15; - string Ex = 16; + string SenderNickName = 5; + string SenderFaceURL = 6; + int32 PlatformID = 7; + int32 SessionType = 8; + int32 MsgFrom = 9; + int32 ContentType = 10; + string RecvID = 11; + repeated string ForceList = 12; + string Content = 13; + string Options = 14; + string ClientMsgID = 15; + string OffLineInfo = 16; + string Ex = 17; } @@ -114,7 +128,6 @@ message UserSendMsgResp { int32 ErrCode = 1; string ErrMsg = 2; int32 ReqIdentifier = 3; - int32 MsgIncr = 4; int64 SendTime = 5; string ServerMsgID = 6; string ClientMsgID = 7; diff --git a/src/proto/push/push.pb.go b/src/proto/push/push.pb.go index bf6e6ea67..319769870 100644 --- a/src/proto/push/push.pb.go +++ b/src/proto/push/push.pb.go @@ -38,7 +38,9 @@ type PushMsgReq struct { OfflineInfo string `protobuf:"bytes,11,opt,name=OfflineInfo,proto3" json:"OfflineInfo,omitempty"` Options string `protobuf:"bytes,12,opt,name=Options,proto3" json:"Options,omitempty"` PlatformID int32 `protobuf:"varint,13,opt,name=PlatformID,proto3" json:"PlatformID,omitempty"` - IsEmphasize bool `protobuf:"varint,14,opt,name=IsEmphasize,proto3" json:"IsEmphasize,omitempty"` + SenderNickName string `protobuf:"bytes,14,opt,name=SenderNickName,proto3" json:"SenderNickName,omitempty"` + SenderFaceURL string `protobuf:"bytes,15,opt,name=SenderFaceURL,proto3" json:"SenderFaceURL,omitempty"` + ClientMsgID string `protobuf:"bytes,16,opt,name=ClientMsgID,proto3" json:"ClientMsgID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -160,11 +162,25 @@ func (m *PushMsgReq) GetPlatformID() int32 { return 0 } -func (m *PushMsgReq) GetIsEmphasize() bool { +func (m *PushMsgReq) GetSenderNickName() string { if m != nil { - return m.IsEmphasize + return m.SenderNickName } - return false + return "" +} + +func (m *PushMsgReq) GetSenderFaceURL() string { + if m != nil { + return m.SenderFaceURL + } + return "" +} + +func (m *PushMsgReq) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" } type PushMsgResp struct { @@ -216,29 +232,31 @@ func init() { } var fileDescriptor_ae0042da44e9a7a7 = []byte{ - // 346 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x92, 0x4d, 0x6b, 0xf2, 0x40, - 0x14, 0x85, 0xc9, 0xab, 0xf1, 0x63, 0xf2, 0x6a, 0xdb, 0xa1, 0x94, 0x8b, 0x8b, 0x12, 0x5c, 0x65, - 0x53, 0x0b, 0xed, 0xb2, 0x9b, 0x52, 0xd3, 0x42, 0x16, 0xa2, 0x4c, 0x5c, 0x75, 0xe7, 0xc7, 0x8d, - 0x06, 0xcc, 0xcc, 0x98, 0x89, 0x42, 0xfb, 0x6b, 0xfa, 0x53, 0xcb, 0x9d, 0x44, 0x0d, 0xdd, 0x88, - 0xe7, 0x39, 0xe7, 0x1e, 0x2e, 0xb9, 0xc3, 0xae, 0xf4, 0xc1, 0x6c, 0x1f, 0xe9, 0x67, 0xa4, 0x73, - 0x55, 0x28, 0xde, 0xa4, 0xff, 0xc3, 0x9f, 0x06, 0x63, 0xb3, 0x83, 0xd9, 0x4e, 0xcc, 0x46, 0xe0, - 0x9e, 0xdf, 0xb1, 0x56, 0x8c, 0x72, 0x1d, 0x85, 0xe0, 0xf8, 0x4e, 0xd0, 0x15, 0x95, 0x22, 0x2e, - 0x70, 0x75, 0x8c, 0x42, 0xf8, 0x57, 0xf2, 0x52, 0x71, 0x60, 0xed, 0xb1, 0x92, 0x05, 0xca, 0x02, - 0x1a, 0xd6, 0x38, 0x49, 0x72, 0x28, 0x13, 0xe3, 0x1e, 0x9a, 0xbe, 0x13, 0x34, 0xc4, 0x49, 0xf2, - 0x01, 0xeb, 0x50, 0xeb, 0x3c, 0xcd, 0x10, 0x5c, 0x6b, 0x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ff, 0xff, 0x20, 0x4b, 0x09, 0x6a, 0x42, 0x02, 0x00, 0x00, + // 377 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x92, 0x5d, 0xeb, 0xda, 0x30, + 0x14, 0xc6, 0xe9, 0xb4, 0xbe, 0x9c, 0xce, 0x97, 0x85, 0x31, 0x82, 0x17, 0xa3, 0xc8, 0x18, 0xde, + 0xcc, 0xc1, 0x76, 0xb9, 0x9b, 0x31, 0x8b, 0x50, 0x98, 0x2f, 0xa4, 0xee, 0x66, 0x77, 0xb5, 0x9e, + 0x6a, 0x59, 0x9b, 0xc4, 0xa6, 0x0a, 0xfb, 0xd2, 0xfb, 0x0c, 0x23, 0x49, 0xd5, 0xfe, 0xbd, 0x29, + 0x7d, 0x7e, 0xe7, 0x39, 0x87, 0x27, 0xc9, 0x81, 0x91, 0xbc, 0xa8, 0xd3, 0x67, 0xfd, 0x99, 0xcb, + 0x52, 0x54, 0x82, 0xb4, 0xf5, 0xff, 0xf4, 0x5f, 0x0b, 0x60, 0x7b, 0x51, 0xa7, 0x95, 0x3a, 0x32, + 0x3c, 0x93, 0x77, 0xd0, 0x89, 0x90, 0x1f, 0xc2, 0x80, 0x3a, 0xbe, 0x33, 0xeb, 0xb3, 0x5a, 0x69, + 0xce, 0x30, 0xb9, 0x86, 0x01, 0x7d, 0x65, 0xb9, 0x55, 0x84, 0x42, 0x77, 0x21, 0x78, 0x85, 0xbc, + 0xa2, 0x2d, 0x53, 0xb8, 0x49, 0x5d, 0xd1, 0x9e, 0x08, 0xcf, 0xb4, 0xed, 0x3b, 0xb3, 0x16, 0xbb, + 0x49, 0x32, 0x81, 0x9e, 0x9e, 0xba, 0xcb, 0x0a, 0xa4, 0xae, 0x29, 0xdd, 0xb5, 0xee, 0x5a, 0xa9, + 0xe3, 0xb2, 0x14, 0x05, 0xed, 0xf8, 0xce, 0xcc, 0x65, 0x37, 0x49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a7, 0xd9, 0x37, 0xb9, 0xd7, 0x74, 0xdf, 0x31, 0xdb, 0xf7, 0xf5, 0x7f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0x50, 0x88, 0x84, 0xf6, 0x90, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/src/proto/push/push.proto b/src/proto/push/push.proto index 8c3715edf..7226aa543 100644 --- a/src/proto/push/push.proto +++ b/src/proto/push/push.proto @@ -16,7 +16,9 @@ message PushMsgReq { string OfflineInfo = 11; string Options =12; int32 PlatformID =13; - bool IsEmphasize = 14; + string SenderNickName = 14; + string SenderFaceURL = 15; + string ClientMsgID = 16; } message PushMsgResp{ int32 ResultCode = 1; diff --git a/src/proto/relay/relay.pb.go b/src/proto/relay/relay.pb.go index cb9759907..b8e990a90 100644 --- a/src/proto/relay/relay.pb.go +++ b/src/proto/relay/relay.pb.go @@ -36,7 +36,9 @@ type MsgToUserReq struct { OperationID string `protobuf:"bytes,11,opt,name=OperationID,proto3" json:"OperationID,omitempty"` ServerMsgID string `protobuf:"bytes,12,opt,name=ServerMsgID,proto3" json:"ServerMsgID,omitempty"` PlatformID int32 `protobuf:"varint,13,opt,name=PlatformID,proto3" json:"PlatformID,omitempty"` - IsEmphasize bool `protobuf:"varint,14,opt,name=IsEmphasize,proto3" json:"IsEmphasize,omitempty"` + SenderNickName string `protobuf:"bytes,14,opt,name=SenderNickName,proto3" json:"SenderNickName,omitempty"` + SenderFaceURL string `protobuf:"bytes,15,opt,name=SenderFaceURL,proto3" json:"SenderFaceURL,omitempty"` + ClientMsgID string `protobuf:"bytes,16,opt,name=ClientMsgID,proto3" json:"ClientMsgID,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` @@ -144,11 +146,25 @@ func (m *MsgToUserReq) GetPlatformID() int32 { return 0 } -func (m *MsgToUserReq) GetIsEmphasize() bool { +func (m *MsgToUserReq) GetSenderNickName() string { if m != nil { - return m.IsEmphasize + return m.SenderNickName } - return false + return "" +} + +func (m *MsgToUserReq) GetSenderFaceURL() string { + if m != nil { + return m.SenderFaceURL + } + return "" +} + +func (m *MsgToUserReq) GetClientMsgID() string { + if m != nil { + return m.ClientMsgID + } + return "" } type MsgToUserResp struct { @@ -267,31 +283,33 @@ func init() { } var fileDescriptor_b6da3b5c0d1535b3 = []byte{ - // 381 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xcb, 0x6a, 0xe3, 0x30, - 0x18, 0x85, 0x71, 0x3c, 0xb9, 0x29, 0x37, 0x46, 0x33, 0x04, 0x4d, 0x16, 0x83, 0xc9, 0xa2, 0x98, - 0x2e, 0x52, 0x48, 0xa1, 0x9b, 0xec, 0x1a, 0x37, 0xe0, 0x85, 0x49, 0x91, 0xd3, 0x4d, 0x77, 0x4e, - 0xf2, 0xd7, 0x35, 0xd8, 0x92, 0x22, 0xb9, 0x81, 0xf4, 0xb1, 0xfb, 0x04, 0x45, 0x72, 0xd2, 0x88, - 0x94, 0x6e, 0x8c, 0xcf, 0xf7, 0x1f, 0x1f, 0x1f, 0x5d, 0xd0, 0x6f, 0x09, 0x79, 0x72, 0xb8, 0x31, - 0xcf, 0x89, 0x90, 0xbc, 0xe4, 0xb8, 0x6e, 0xc4, 0xf8, 0xa3, 0x86, 0xba, 0x91, 0x4a, 0x57, 0xfc, - 0x49, 0x81, 0xa4, 0xb0, 0xc3, 0x43, 0xd4, 0x88, 0x81, 0x6d, 0xc3, 0x80, 0x38, 0x9e, 0xe3, 0xb7, - 0xe9, 0x51, 0x69, 0x4e, 0x61, 0xb3, 0x0f, 0x03, 0x52, 0xab, 0x78, 0xa5, 0x30, 0x41, 0xcd, 0x39, - 0x67, 0x25, 0xb0, 0x92, 0xd4, 0xcd, 0xe0, 0x24, 0xf5, 0x44, 0x7b, 0x62, 0xd8, 0x91, 0x86, 0x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0x83, 0x08, 0x94, 0x4a, 0x52, 0xa0, 0xba, 0x9e, 0xde, 0x92, - 0x6c, 0x03, 0xf8, 0x0e, 0xb5, 0xcf, 0x4d, 0xfe, 0x1c, 0xab, 0xdb, 0x57, 0x6a, 0xf4, 0xf7, 0x3b, - 0x54, 0xe2, 0x7e, 0xf0, 0xdc, 0x33, 0x78, 0x26, 0xd6, 0x26, 0x6f, 0xdd, 0x30, 0x17, 0xf3, 0xf6, - 0x33, 0x00, 0x00, 0xff, 0xff, 0x57, 0x9a, 0x71, 0x03, 0xad, 0x02, 0x00, 0x00, + // 412 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xc1, 0x6f, 0xd3, 0x30, + 0x14, 0xc6, 0x15, 0x42, 0xbb, 0xf5, 0x75, 0x6d, 0xc1, 0xa0, 0xc9, 0xec, 0x80, 0xa2, 0x0a, 0x4d, + 0x11, 0x87, 0x21, 0x0d, 0x89, 0xcb, 0x6e, 0x2c, 0xaa, 0x14, 0x89, 0x6c, 0xc8, 0xe9, 0x2e, 0xdc, + 0xb2, 0xec, 0x11, 0x59, 0x24, 0x76, 0x6a, 0x87, 0x49, 0xfb, 0xef, 0xf8, 0xd3, 0x90, 0x9f, 0x5b, + 0x6a, 0x8a, 0xb8, 0x44, 0xf9, 0x7e, 0xef, 0xcb, 0xcb, 0xe7, 0xe7, 0x07, 0x2f, 0x0d, 0xb6, 0xd5, + 0xd3, 0x07, 0x7a, 0x5e, 0xf4, 0x46, 0x0f, 0x9a, 0x8d, 0x48, 0x2c, 0x7f, 0xc5, 0x70, 0x52, 0xd8, + 0x66, 0xad, 0xef, 0x2c, 0x1a, 0x81, 0x1b, 0x76, 0x0a, 0xe3, 0x12, 0xd5, 0x43, 0x9e, 0xf1, 0x28, + 0x89, 0xd2, 0x89, 0xd8, 0x2a, 0xc7, 0x05, 0xd6, 0x8f, 0x79, 0xc6, 0x9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xf6, 0x52, 0xaa, 0xa6, 0xc5, 0xbd, 0x93, 0x3c, 0xcb, 0x0d, 0x2c, 0x0e, 0x0a, 0xee, + 0x7c, 0x02, 0xed, 0xcf, 0x76, 0xb8, 0xd6, 0x0f, 0x48, 0x5b, 0x10, 0x8b, 0x80, 0xfc, 0x77, 0x13, + 0xce, 0x61, 0xee, 0xde, 0xdc, 0x24, 0x56, 0x7e, 0x36, 0x31, 0xcd, 0xe6, 0x80, 0x5e, 0x96, 0xf0, + 0xe6, 0x56, 0xb5, 0x52, 0x61, 0x81, 0xd6, 0x56, 0x0d, 0x0a, 0x17, 0xcf, 0x0d, 0x58, 0xd6, 0xc8, + 0x3e, 0xc1, 0x64, 0x9f, 0xe4, 0xd5, 0x36, 0x7a, 0xb8, 0xa0, 0x67, 0xaf, 0xff, 0x85, 0xb6, 0xff, + 0xbc, 0xf8, 0x36, 0x23, 0x7c, 0xd5, 0xdf, 0x53, 0xbf, 0xfb, 0x31, 0xad, 0xf9, 0xc7, 0xdf, 0x01, + 0x00, 0x00, 0xff, 0xff, 0xca, 0xdd, 0x7b, 0x0c, 0xfb, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/src/proto/relay/relay.proto b/src/proto/relay/relay.proto index 8e161e65b..138163a80 100644 --- a/src/proto/relay/relay.proto +++ b/src/proto/relay/relay.proto @@ -14,7 +14,9 @@ message MsgToUserReq { string OperationID = 11; string ServerMsgID = 12; int32 PlatformID = 13; - bool IsEmphasize = 14; + string SenderNickName = 14; + string SenderFaceURL = 15; + string ClientMsgID = 16; } message MsgToUserResp{ repeated SingleMsgToUser resp = 1; diff --git a/src/push/content_struct/content.go b/src/push/content_struct/content.go index 84521c7bb..8b311686a 100644 --- a/src/push/content_struct/content.go +++ b/src/push/content_struct/content.go @@ -44,6 +44,11 @@ type AgreeOrRejectGroupMember struct { FaceUrl string `json:"faceUrl"` Reason string `json:"reason"` } +type AtTextContent struct { + Text string `json:"text"` + AtUserList []string `json:"atUserList"` + IsAtSelf bool `json:"isAtSelf"` +} type CreateGroupSysMsg struct { uIdCreator string `creatorUid` diff --git a/src/push/logic/push_handler.go b/src/push/logic/push_handler.go index ae4cc6b4f..01a6115f4 100644 --- a/src/push/logic/push_handler.go +++ b/src/push/logic/push_handler.go @@ -47,9 +47,11 @@ func (ms *PushConsumerHandler) handleMs2PsChat(msg []byte) { sendPbData.RecvID = pbData.RecvID sendPbData.Content = pbData.Content sendPbData.SendID = pbData.SendID + sendPbData.SenderNickName = pbData.SenderNickName + sendPbData.SenderFaceURL = pbData.SenderFaceURL + sendPbData.ClientMsgID = pbData.ClientMsgID sendPbData.PlatformID = pbData.PlatformID sendPbData.RecvSeq = pbData.RecvSeq - sendPbData.IsEmphasize = pbData.IsEmphasize //Call push module to send message to the user MsgToUser(&sendPbData, pbData.OfflineInfo, pbData.Options) } diff --git a/src/push/logic/push_rpc_server.go b/src/push/logic/push_rpc_server.go index acec92601..c856e56e5 100644 --- a/src/push/logic/push_rpc_server.go +++ b/src/push/logic/push_rpc_server.go @@ -55,13 +55,15 @@ func (r *RPCServer) PushMsg(_ context.Context, pbData *pbPush.PushMsgReq) (*pbPu sendPbData.ServerMsgID = pbData.MsgID sendPbData.MsgFrom = pbData.MsgFrom sendPbData.ContentType = pbData.ContentType + sendPbData.SenderNickName = pbData.SenderNickName + sendPbData.SenderFaceURL = pbData.SenderFaceURL + sendPbData.ClientMsgID = pbData.ClientMsgID sendPbData.SessionType = pbData.SessionType sendPbData.RecvID = pbData.RecvID sendPbData.Content = pbData.Content sendPbData.SendID = pbData.SendID sendPbData.PlatformID = pbData.PlatformID sendPbData.RecvSeq = pbData.RecvSeq - sendPbData.IsEmphasize = pbData.IsEmphasize //Call push module to send message to the user MsgToUser(&sendPbData, pbData.OfflineInfo, pbData.Options) return &pbPush.PushMsgResp{ diff --git a/src/push/logic/push_to_client.go b/src/push/logic/push_to_client.go index 3bf685f67..564b6741d 100644 --- a/src/push/logic/push_to_client.go +++ b/src/push/logic/push_to_client.go @@ -108,6 +108,7 @@ func MsgToUser(sendPbData *pbRelay.MsgToUserReq, OfflineInfo, Options string) { func SendMsgByWS(m *pbChat.WSToMsgSvrChatMsg) { m.MsgID = rpcChat.GetMsgID(m.SendID) + m.ClientMsgID = m.MsgID switch m.SessionType { case constant.SingleChatType: sendMsgToKafka(m, m.SendID, "msgKey--sendID") diff --git a/src/rpc/chat/chat/pull_message.go b/src/rpc/chat/chat/pull_message.go index 01ef2161c..6801852cf 100644 --- a/src/rpc/chat/chat/pull_message.go +++ b/src/rpc/chat/chat/pull_message.go @@ -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) diff --git a/src/rpc/chat/chat/send_msg.go b/src/rpc/chat/chat/send_msg.go index c36abd027..7b076bade 100644 --- a/src/rpc/chat/chat/send_msg.go +++ b/src/rpc/chat/chat/send_msg.go @@ -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 diff --git a/src/rpc/friend/friend/add_friend_response.go b/src/rpc/friend/friend/add_friend_response.go index 4a48aba72..e8a0b1189 100644 --- a/src/rpc/friend/friend/add_friend_response.go +++ b/src/rpc/friend/friend/add_friend_response.go @@ -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 diff --git a/src/utils/strings.go b/src/utils/strings.go index e117f3cc9..e437ea4fb 100644 --- a/src/utils/strings.go +++ b/src/utils/strings.go @@ -6,7 +6,10 @@ */ package utils -import "strconv" +import ( + "encoding/json" + "strconv" +) func IntToString(i int) string { return strconv.FormatInt(int64(i), 10) @@ -39,3 +42,8 @@ func InterfaceArrayToStringArray(data []interface{}) (i []string) { } return i } +func StructToJsonString(param interface{}) string { + dataType, _ := json.Marshal(param) + dataString := string(dataType) + return dataString +}