diff --git a/config/config.yaml b/config/config.yaml index 8658ecfd5..b8ab770c2 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -178,7 +178,7 @@ iOSPush: notification: groupCreated: conversation: - type: 1 + reliabilityLevel: 1 unreadCount: true offlinePush: switch: true @@ -191,7 +191,7 @@ notification: groupInfoChanged: conversation: - type: 1 + reliabilityLevel: 1 unreadCount: false offlinePush: switch: false @@ -203,6 +203,117 @@ notification: + FriendApplicationAdded: + conversation: + reliabilityLevel: 2 + unreadCount: false + offlinePush: + switch: true + title: "Somebody applies to add you as a friend" + desc: "Somebody applies to add you as a friend" + ext: "Somebody applies to add you as a friend" + defaultTips: + tips: "I applies to add you as a friend" # + + FriendApplicationApproved: + conversation: + reliabilityLevel: 2 + unreadCount: false + offlinePush: + switch: true + title: "Someone applies to add your friend application" + desc: "Someone applies to add your friend application" + ext: "Someone applies to add your friend application" + defaultTips: + tips: "I applies to add your friend application" # + + + FriendApplicationRejected: + conversation: + reliabilityLevel: 2 + unreadCount: false + offlinePush: + switch: true + title: "Someone rejected your friend application" + desc: "Someone rejected your friend application" + ext: "Someone rejected your friend application" + defaultTips: + tips: "I rejected your friend application" # + + + + + + FriendAdded: + conversation: + reliabilityLevel: 3 + unreadCount: true + offlinePush: + switch: true + title: "We have become friends" + desc: "We have become friends" + ext: "We have become friends" + defaultTips: + tips: "We have become friends" # + + + + FriendDeleted: + conversation: + reliabilityLevel: 2 + unreadCount: false + offlinePush: + switch: true + title: "Deleted a friend" + desc: "Deleted a friend" + ext: "Deleted a friend" + defaultTips: + tips: "Deleted a friend" # + + + FriendInfoChanged: + conversation: + reliabilityLevel: 2 + unreadCount: false + offlinePush: + switch: true + title: "Your friend's profile has been changed" + desc: "Your friend's profile has been changed" + ext: "Your friend's profile has been changed" + defaultTips: + tips: "Your friend's profile has been changed" # + + + + BlackAdded: + conversation: + reliabilityLevel: 2 + unreadCount: false + offlinePush: + switch: true + title: "Blocked a user" + desc: "Blocked a user" + ext: "Blocked a user" + defaultTips: + tips: "Blocked a user" # + + + BlackDeleted: + conversation: + reliabilityLevel: 2 + unreadCount: false + offlinePush: + switch: true + title: "Remove a blocked user" + desc: "Remove a blocked user" + ext: "Remove a blocked user" + defaultTips: + tips: "Remove a blocked user" + +" # xx applied to add you as a friend + + + #---------------demo configuration---------------------# #The following configuration items are applied to openIM Demo configuration demoswitch: true diff --git a/internal/rpc/msg/friend_notification.go b/internal/rpc/msg/friend_notification.go index ef05211c2..5e9017568 100644 --- a/internal/rpc/msg/friend_notification.go +++ b/internal/rpc/msg/friend_notification.go @@ -1,6 +1,7 @@ package msg import ( + "Open_IM/pkg/common/config" "Open_IM/pkg/common/constant" imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" "Open_IM/pkg/common/log" @@ -40,70 +41,133 @@ func getFromToUserNickname(fromUserID, toUserID string) (string, string, error) return from.Nickname, to.Nickname, nil } -func FriendApplicationAddedNotification(req *pbFriend.AddFriendReq) { - log.Info(req.CommID.OperationID, utils.GetSelfFuncName(), "args: ", req.String()) - var friendApplicationAddedTips open_im_sdk.FriendApplicationAddedTips - friendApplicationAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID - friendApplicationAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) +func friendNotification(commID *pbFriend.CommID, contentType int32, m proto.Message) { + log.Info(commID.OperationID, utils.GetSelfFuncName(), "args: ", commID, contentType) + var err error + var tips open_im_sdk.TipsComm + tips.Detail, err = proto.Marshal(m) if err != nil { - log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) + log.Error(commID.OperationID, "Marshal failed ", err.Error(), m.String()) return } - var tips open_im_sdk.TipsComm - tips.Detail, err = proto.Marshal(&friendApplicationAddedTips) + + fromUserNickname, toUserNickname, err := getFromToUserNickname(commID.FromUserID, commID.ToUserID) if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendApplicationAddedTips.String()) + log.Error(commID.OperationID, "getFromToUserNickname failed ", err.Error(), commID.FromUserID, commID.ToUserID) + return + } + cn := config.Config.Notification + switch contentType { + case constant.FriendApplicationAddedNotification: + + tips.DefaultTips = fromUserNickname + cn.FriendApplicationAdded.DefaultTips.Tips + case constant.FriendApplicationApprovedNotification: + tips.DefaultTips = fromUserNickname + cn.FriendApplicationApproved.DefaultTips.Tips + case constant.FriendApplicationRejectedNotification: + tips.DefaultTips = fromUserNickname + cn.FriendApplicationRejected.DefaultTips.Tips + case constant.FriendAddedNotification: + tips.DefaultTips = cn.FriendAdded.DefaultTips.Tips + case constant.FriendDeletedNotification: + tips.DefaultTips = cn.FriendDeleted.DefaultTips.Tips + toUserNickname + case constant.FriendInfoChangedNotification: + tips.DefaultTips = fromUserNickname + cn.FriendInfoChanged.DefaultTips.Tips + case constant.BlackAddedNotification: + tips.DefaultTips = cn.BlackAdded.DefaultTips.Tips + toUserNickname + case constant.BlackDeletedNotification: + tips.DefaultTips = cn.BlackDeleted.DefaultTips.Tips + toUserNickname + default: + log.Error(commID.OperationID, "contentType failed ", contentType) return } - tips.DefaultTips = fromUserNickname + " FriendApplicationAddedNotification " + toUserNickname var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.FriendApplicationAddedNotification + n.SendID = commID.FromUserID + n.RecvID = commID.ToUserID + n.ContentType = contentType n.SessionType = constant.SingleChatType n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID + n.OperationID = commID.OperationID n.Content, err = proto.Marshal(&tips) if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) + log.Error(commID.OperationID, "Marshal failed ", err.Error(), tips.String()) return } Notification(&n) } +func FriendApplicationAddedNotification(req *pbFriend.AddFriendReq) { + log.Info(req.CommID.OperationID, utils.GetSelfFuncName(), "args: ", req.String()) + var friendApplicationAddedTips open_im_sdk.FriendApplicationAddedTips + friendApplicationAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID + friendApplicationAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID + friendNotification(req.CommID, constant.FriendApplicationAddedNotification, &friendApplicationAddedTips) + //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) + //if err != nil { + // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) + // return + //} + //var tips open_im_sdk.TipsComm + //tips.Detail, err = proto.Marshal(&friendApplicationAddedTips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendApplicationAddedTips.String()) + // return + //} + //tips.DefaultTips = fromUserNickname + " FriendApplicationAddedNotification " + toUserNickname + // + //var n NotificationMsg + //n.SendID = req.CommID.FromUserID + //n.RecvID = req.CommID.ToUserID + //n.ContentType = constant.FriendApplicationAddedNotification + //n.SessionType = constant.SingleChatType + //n.MsgFrom = constant.SysMsgType + //n.OperationID = req.CommID.OperationID + //n.Content, err = proto.Marshal(&tips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) + // return + //} + //Notification(&n) +} + func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) { var friendApplicationProcessedTips open_im_sdk.FriendApplicationProcessedTips friendApplicationProcessedTips.FromToUserID.FromUserID = req.CommID.FromUserID friendApplicationProcessedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) - if err != nil { - log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) - return + friendApplicationProcessedTips.HandleResult = req.HandleResult + //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) + //if err != nil { + // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) + // return + //} + if friendApplicationProcessedTips.HandleResult == 1 { + friendNotification(req.CommID, constant.FriendApplicationApprovedNotification, &friendApplicationProcessedTips) + } else if friendApplicationProcessedTips.HandleResult == -1 { + friendNotification(req.CommID, constant.FriendApplicationRejectedNotification, &friendApplicationProcessedTips) + } else { + log.Error(req.CommID.OperationID, "HandleResult failed ", friendApplicationProcessedTips.HandleResult) } - var tips open_im_sdk.TipsComm - tips.Detail, err = proto.Marshal(&friendApplicationProcessedTips) - if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendApplicationProcessedTips.String()) - return - } - tips.DefaultTips = fromUserNickname + " FriendApplicationProcessedNotification " + toUserNickname - - var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.FriendApplicationProcessedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID - n.Content, err = proto.Marshal(&tips) - if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) - return - } - Notification(&n) + //var tips open_im_sdk.TipsComm + //tips.DefaultTips = fromUserNickname + " FriendApplicationProcessedNotification " + toUserNickname + //tips.Detail, err = proto.Marshal(&friendApplicationProcessedTips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendApplicationProcessedTips.String()) + // return + //} + // + //var n NotificationMsg + //n.SendID = req.CommID.FromUserID + //n.RecvID = req.CommID.ToUserID + //n.ContentType = constant.FriendApplicationProcessedNotification + //n.SessionType = constant.SingleChatType + //n.MsgFrom = constant.SysMsgType + //n.OperationID = req.CommID.OperationID + //n.Content, err = proto.Marshal(&tips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) + // return + //} + //Notification(&n) } func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) { @@ -120,31 +184,34 @@ func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) return } utils2.FriendDBCopyOpenIM(friendAddedTips.Friend, friend) - fromUserNickname, toUserNickname, err := getFromToUserNickname(fromUserID, toUserID) - if err != nil { - log.Error(operationID, "getFromToUserNickname failed ", err.Error(), fromUserID, toUserID) - return - } - var tips open_im_sdk.TipsComm - tips.Detail, err = proto.Marshal(&friendAddedTips) - if err != nil { - log.Error(operationID, "Marshal failed ", err.Error(), friendAddedTips) - return - } - tips.DefaultTips = fromUserNickname + " FriendAddedNotification " + toUserNickname - var n NotificationMsg - n.SendID = fromUserID - n.RecvID = toUserID - n.ContentType = constant.FriendAddedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - n.Content, _ = proto.Marshal(&tips) - if err != nil { - log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) - return - } - Notification(&n) + commID := pbFriend.CommID{FromUserID: fromUserID, ToUserID: toUserID, OpUserID: opUserID, OperationID: operationID} + friendNotification(&commID, constant.FriendAddedNotification, &friendAddedTips) + //fromUserNickname, toUserNickname, err := getFromToUserNickname(fromUserID, toUserID) + //if err != nil { + // log.Error(operationID, "getFromToUserNickname failed ", err.Error(), fromUserID, toUserID) + // return + //} + //var tips open_im_sdk.TipsComm + //tips.DefaultTips = fromUserNickname + " FriendAddedNotification " + toUserNickname + //tips.Detail, err = proto.Marshal(&friendAddedTips) + //if err != nil { + // log.Error(operationID, "Marshal failed ", err.Error(), friendAddedTips) + // return + //} + // + //var n NotificationMsg + //n.SendID = fromUserID + //n.RecvID = toUserID + //n.ContentType = constant.FriendAddedNotification + //n.SessionType = constant.SingleChatType + //n.MsgFrom = constant.SysMsgType + //n.OperationID = operationID + //n.Content, err = proto.Marshal(&tips) + //if err != nil { + // log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) + // return + //} + //Notification(&n) } //message FriendDeletedTips{ @@ -154,31 +221,33 @@ func FriendDeletedNotification(req *pbFriend.DeleteFriendReq) { var friendDeletedTips open_im_sdk.FriendDeletedTips friendDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID friendDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) - if err != nil { - log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", req.CommID.FromUserID, req.CommID.ToUserID) - return - } - var tips open_im_sdk.TipsComm - tips.Detail, err = proto.Marshal(&friendDeletedTips) - if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendDeletedTips.String()) - return - } - tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname - var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.FriendDeletedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID - n.Content, err = proto.Marshal(&tips) - if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) - return - } - Notification(&n) + //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) + //if err != nil { + // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", req.CommID.FromUserID, req.CommID.ToUserID) + // return + //} + friendNotification(req.CommID, constant.FriendDeletedNotification, &friendDeletedTips) + //var tips open_im_sdk.TipsComm + //tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname + //tips.Detail, err = proto.Marshal(&friendDeletedTips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendDeletedTips.String()) + // return + //} + // + //var n NotificationMsg + //n.SendID = req.CommID.FromUserID + //n.RecvID = req.CommID.ToUserID + //n.ContentType = constant.FriendDeletedNotification + //n.SessionType = constant.SingleChatType + //n.MsgFrom = constant.SysMsgType + //n.OperationID = req.CommID.OperationID + //n.Content, err = proto.Marshal(&tips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) + // return + //} + //Notification(&n) } //message FriendInfoChangedTips{ @@ -190,63 +259,66 @@ func FriendInfoChangedNotification(operationID, opUserID, fromUserID, toUserID s var friendInfoChangedTips open_im_sdk.FriendInfoChangedTips friendInfoChangedTips.FromToUserID.FromUserID = fromUserID friendInfoChangedTips.FromToUserID.ToUserID = toUserID - fromUserNickname, toUserNickname, err := getFromToUserNickname(fromUserID, toUserID) - if err != nil { - log.Error(operationID, "getFromToUserNickname failed ", fromUserID, toUserID) - return - } - var tips open_im_sdk.TipsComm - tips.Detail, err = proto.Marshal(&friendInfoChangedTips) - if err != nil { - log.Error(operationID, "Marshal failed ", err.Error(), friendInfoChangedTips.String()) - return - } - tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname - var n NotificationMsg - n.SendID = fromUserID - n.RecvID = toUserID - n.ContentType = constant.FriendInfoChangedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - - n.Content, err = proto.Marshal(&tips) - if err != nil { - log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) - return - } - Notification(&n) + //fromUserNickname, toUserNickname, err := getFromToUserNickname(fromUserID, toUserID) + //if err != nil { + // log.Error(operationID, "getFromToUserNickname failed ", fromUserID, toUserID) + // return + //} + commID := pbFriend.CommID{FromUserID: fromUserID, ToUserID: toUserID, OpUserID: opUserID, OperationID: operationID} + friendNotification(&commID, constant.FriendInfoChangedNotification, &friendInfoChangedTips) + //var tips open_im_sdk.TipsComm + //tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname + //tips.Detail, err = proto.Marshal(&friendInfoChangedTips) + //if err != nil { + // log.Error(operationID, "Marshal failed ", err.Error(), friendInfoChangedTips.String()) + // return + //} + // + //var n NotificationMsg + //n.SendID = fromUserID + //n.RecvID = toUserID + //n.ContentType = constant.FriendInfoChangedNotification + //n.SessionType = constant.SingleChatType + //n.MsgFrom = constant.SysMsgType + //n.OperationID = operationID + //n.Content, err = proto.Marshal(&tips) + //if err != nil { + // log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) + // return + //} + //Notification(&n) } func BlackAddedNotification(req *pbFriend.AddBlacklistReq) { var blackAddedTips open_im_sdk.BlackAddedTips blackAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID blackAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) - if err != nil { - log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", req.CommID.FromUserID, req.CommID.ToUserID) - return - } - var tips open_im_sdk.TipsComm - tips.Detail, err = proto.Marshal(&blackAddedTips) - if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), blackAddedTips.String()) - return - } - tips.DefaultTips = fromUserNickname + " BlackAddedNotification " + toUserNickname - var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.BlackAddedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID - n.Content, err = proto.Marshal(&tips) - if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) - return - } - Notification(&n) + //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) + //if err != nil { + // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", req.CommID.FromUserID, req.CommID.ToUserID) + // return + //} + //var tips open_im_sdk.TipsComm + //tips.DefaultTips = fromUserNickname + " BlackAddedNotification " + toUserNickname + //tips.Detail, err = proto.Marshal(&blackAddedTips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), blackAddedTips.String()) + // return + //} + friendNotification(req.CommID, constant.BlackAddedNotification, &blackAddedTips) + //var n NotificationMsg + //n.SendID = req.CommID.FromUserID + //n.RecvID = req.CommID.ToUserID + //n.ContentType = constant.BlackAddedNotification + //n.SessionType = constant.SingleChatType + //n.MsgFrom = constant.SysMsgType + //n.OperationID = req.CommID.OperationID + //n.Content, err = proto.Marshal(&tips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) + // return + //} + //Notification(&n) } //message BlackDeletedTips{ @@ -256,31 +328,32 @@ func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { var blackDeletedTips open_im_sdk.BlackDeletedTips blackDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID blackDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID - fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) - if err != nil { - log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) - return - } - var tips open_im_sdk.TipsComm - tips.Detail, err = proto.Marshal(&blackDeletedTips) - if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), blackDeletedTips.String()) - return - } - tips.DefaultTips = fromUserNickname + " BlackDeletedNotification " + toUserNickname - var n NotificationMsg - n.SendID = req.CommID.FromUserID - n.RecvID = req.CommID.ToUserID - n.ContentType = constant.BlackDeletedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = req.CommID.OperationID - n.Content, err = proto.Marshal(&tips) - if err != nil { - log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) - return - } - Notification(&n) + //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) + //if err != nil { + // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) + // return + //} + //var tips open_im_sdk.TipsComm + //tips.Detail, err = proto.Marshal(&blackDeletedTips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), blackDeletedTips.String()) + // return + //} + friendNotification(req.CommID, constant.BlackDeletedNotification, &blackDeletedTips) + //tips.DefaultTips = fromUserNickname + " BlackDeletedNotification " + toUserNickname + //var n NotificationMsg + //n.SendID = req.CommID.FromUserID + //n.RecvID = req.CommID.ToUserID + //n.ContentType = constant.BlackDeletedNotification + //n.SessionType = constant.SingleChatType + //n.MsgFrom = constant.SysMsgType + //n.OperationID = req.CommID.OperationID + //n.Content, err = proto.Marshal(&tips) + //if err != nil { + // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) + // return + //} + //Notification(&n) } //message SelfInfoUpdatedTips{ @@ -288,33 +361,35 @@ func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) { // PublicUserInfo OpUser = 2; // uint64 OperationTime = 3; //} -func SelfInfoUpdatedNotification(operationID, userID string) { +func SelfInfoUpdatedNotification(operationID, userID string, opUserID string) { var selfInfoUpdatedTips open_im_sdk.SelfInfoUpdatedTips selfInfoUpdatedTips.UserID = userID - u, err := imdb.GetUserByUserID(userID) - if err != nil { - log.NewError(operationID, "FindUserByUID failed ", err.Error(), userID) - return - } - var tips open_im_sdk.TipsComm - tips.Detail, err = proto.Marshal(&selfInfoUpdatedTips) - if err != nil { - log.Error(operationID, "Marshal failed ", err.Error(), selfInfoUpdatedTips.String()) - return - } - var n NotificationMsg - n.SendID = userID - n.RecvID = userID - n.ContentType = constant.SelfInfoUpdatedNotification - n.SessionType = constant.SingleChatType - n.MsgFrom = constant.SysMsgType - n.OperationID = operationID - - tips.DefaultTips = u.Nickname + " SelfInfoUpdatedNotification " - n.Content, err = proto.Marshal(&tips) - if err != nil { - log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) - return - } - Notification(&n) + commID := pbFriend.CommID{FromUserID: userID, ToUserID: userID, OpUserID: opUserID, OperationID: operationID} + friendNotification(&commID, constant.SelfInfoUpdatedNotification, &selfInfoUpdatedTips) + //u, err := imdb.GetUserByUserID(userID) + //if err != nil { + // log.NewError(operationID, "FindUserByUID failed ", err.Error(), userID) + // return + //} + //var tips open_im_sdk.TipsComm + //tips.Detail, err = proto.Marshal(&selfInfoUpdatedTips) + //if err != nil { + // log.Error(operationID, "Marshal failed ", err.Error(), selfInfoUpdatedTips.String()) + // return + //} + //var n NotificationMsg + //n.SendID = userID + //n.RecvID = userID + //n.ContentType = constant.SelfInfoUpdatedNotification + //n.SessionType = constant.SingleChatType + //n.MsgFrom = constant.SysMsgType + //n.OperationID = operationID + // + //tips.DefaultTips = u.Nickname + " SelfInfoUpdatedNotification " + //n.Content, err = proto.Marshal(&tips) + //if err != nil { + // log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) + // return + //} + //Notification(&n) } diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 0cf426051..e4366d6b6 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -237,6 +237,6 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI for _, v := range RpcResp.FriendInfoList { chat.FriendInfoChangedNotification(req.OperationID, req.OpUserID, req.UserInfo.UserID, v.FriendUser.UserID) } - chat.SelfInfoUpdatedNotification(req.OperationID, req.UserInfo.UserID) + chat.SelfInfoUpdatedNotification(req.OperationID, req.UserInfo.UserID, req.OpUserID) return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{}}, nil } diff --git a/pkg/common/config/config.go b/pkg/common/config/config.go index b2679bf9b..bf175b3b6 100644 --- a/pkg/common/config/config.go +++ b/pkg/common/config/config.go @@ -181,6 +181,51 @@ type config struct { OfflinePush POfflinePush `yaml:"offlinePush"` DefaultTips PDefaultTips `yaml:"defaultTips"` } + //////////////////////friend/////////////////////// + FriendApplicationAdded struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + + FriendApplicationApproved struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + + FriendApplicationRejected struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + + FriendAdded struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + + FriendDeleted struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + FriendInfoChanged struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + BlackAdded struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } + BlackDeleted struct { + Conversation PConversation `yaml:"conversation"` + OfflinePush POfflinePush `yaml:"offlinePush"` + DefaultTips PDefaultTips `yaml:"defaultTips"` + } } Demo struct { Port []int `yaml:"openImDemoPort"` @@ -201,8 +246,8 @@ type config struct { } } type PConversation struct { - ConversationChanged bool `yaml:"conversationChanged"` - UnreadCount bool `yaml:"unreadCount"` + ReliabilityLevel int `yaml:"reliabilityLevel"` + UnreadCount bool `yaml:"unreadCount"` } type POfflinePush struct { diff --git a/pkg/common/constant/constant.go b/pkg/common/constant/constant.go index cd35036fb..d8c3ba66d 100644 --- a/pkg/common/constant/constant.go +++ b/pkg/common/constant/constant.go @@ -46,24 +46,35 @@ const ( //SysRelated - FriendApplicationProcessedNotification = 1201 //AcceptFriendApplicationTip = 201 - FriendApplicationAddedNotification = 1202 //AddFriendTip = 202 - FriendAddedNotification = 1203 - FriendDeletedNotification = 1204 - FriendInfoChangedNotification = 1205 - BlackAddedNotification = 1206 - BlackDeletedNotification = 1207 + FriendApplicationApprovedNotification = 1201 + FriendApplicationRejectedNotification = 1202 + FriendApplicationAddedNotification = 1203 //AddFriendTip = 202 + FriendAddedNotification = 1204 + FriendDeletedNotification = 1205 + FriendInfoChangedNotification = 1206 + BlackAddedNotification = 1207 + BlackDeletedNotification = 1208 SelfInfoUpdatedNotification = 1303 //SetSelfInfoTip = 204 - GroupCreatedNotification = 1501 //CreateGroupTip = 502 - JoinApplicationNotification = 1502 //JoinGroupTip = 504 - ApplicationProcessedNotification = 1503 //AcceptGroupApplicationTip = 507 RefuseGroupApplicationTip = 508 - MemberInvitedNotification = 1504 //InviteUserToGroupTip = 510 - MemberKickedNotification = 1505 //KickGroupMemberTip = 509 - GroupInfoChangedNotification = 1506 //SetGroupInfoTip = 506 TransferGroupOwnerTip = 501 - MemberLeaveNotification = 1507 //QuitGroupTip = 505 - MemberEnterNotification = 1508 + GroupCreatedNotification = 1501 + MemberInfoSetNotification = 1501 + JoinGroupApplicationNotification = 1501 + MemberQuitNotification = 1501 + GroupApplicationAcceptedNotification = 1501 + GroupApplicationRejectedNotification = 1501 + GroupOwnerTransferredNotification = 1501 + MemberKickedNotification = 1501 + MemberInvitedNotification = 1501 + + //GroupCreatedNotification = 1501 + //JoinApplicationNotification = 1502 + //ApplicationProcessedNotification = 1503 + //MemberInvitedNotification = 1504 + //MemberKickedNotification = 1505 + //GroupInfoChangedNotification = 1506 + //MemberLeaveNotification = 1507 + //MemberEnterNotification = 1508 //MsgFrom UserMsgType = 100 diff --git a/pkg/proto/friend/friend.pb.go b/pkg/proto/friend/friend.pb.go index 0f13634a6..88e92e2f5 100644 --- a/pkg/proto/friend/friend.pb.go +++ b/pkg/proto/friend/friend.pb.go @@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{0} + return fileDescriptor_friend_74b4824fb8c5de90, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -84,7 +84,7 @@ func (m *CommID) Reset() { *m = CommID{} } func (m *CommID) String() string { return proto.CompactTextString(m) } func (*CommID) ProtoMessage() {} func (*CommID) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{1} + return fileDescriptor_friend_74b4824fb8c5de90, []int{1} } func (m *CommID) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommID.Unmarshal(m, b) @@ -143,7 +143,7 @@ func (m *GetFriendsInfoReq) Reset() { *m = GetFriendsInfoReq{} } func (m *GetFriendsInfoReq) String() string { return proto.CompactTextString(m) } func (*GetFriendsInfoReq) ProtoMessage() {} func (*GetFriendsInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{2} + return fileDescriptor_friend_74b4824fb8c5de90, []int{2} } func (m *GetFriendsInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendsInfoReq.Unmarshal(m, b) @@ -183,7 +183,7 @@ func (m *GetFriendInfoResp) Reset() { *m = GetFriendInfoResp{} } func (m *GetFriendInfoResp) String() string { return proto.CompactTextString(m) } func (*GetFriendInfoResp) ProtoMessage() {} func (*GetFriendInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{3} + return fileDescriptor_friend_74b4824fb8c5de90, []int{3} } func (m *GetFriendInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendInfoResp.Unmarshal(m, b) @@ -236,7 +236,7 @@ func (m *AddFriendReq) Reset() { *m = AddFriendReq{} } func (m *AddFriendReq) String() string { return proto.CompactTextString(m) } func (*AddFriendReq) ProtoMessage() {} func (*AddFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{4} + return fileDescriptor_friend_74b4824fb8c5de90, []int{4} } func (m *AddFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendReq.Unmarshal(m, b) @@ -281,7 +281,7 @@ func (m *AddFriendResp) Reset() { *m = AddFriendResp{} } func (m *AddFriendResp) String() string { return proto.CompactTextString(m) } func (*AddFriendResp) ProtoMessage() {} func (*AddFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{5} + return fileDescriptor_friend_74b4824fb8c5de90, []int{5} } func (m *AddFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResp.Unmarshal(m, b) @@ -322,7 +322,7 @@ func (m *ImportFriendReq) Reset() { *m = ImportFriendReq{} } func (m *ImportFriendReq) String() string { return proto.CompactTextString(m) } func (*ImportFriendReq) ProtoMessage() {} func (*ImportFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{6} + return fileDescriptor_friend_74b4824fb8c5de90, []int{6} } func (m *ImportFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendReq.Unmarshal(m, b) @@ -382,7 +382,7 @@ func (m *UserIDResult) Reset() { *m = UserIDResult{} } func (m *UserIDResult) String() string { return proto.CompactTextString(m) } func (*UserIDResult) ProtoMessage() {} func (*UserIDResult) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{7} + return fileDescriptor_friend_74b4824fb8c5de90, []int{7} } func (m *UserIDResult) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserIDResult.Unmarshal(m, b) @@ -428,7 +428,7 @@ func (m *ImportFriendResp) Reset() { *m = ImportFriendResp{} } func (m *ImportFriendResp) String() string { return proto.CompactTextString(m) } func (*ImportFriendResp) ProtoMessage() {} func (*ImportFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{8} + return fileDescriptor_friend_74b4824fb8c5de90, []int{8} } func (m *ImportFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ImportFriendResp.Unmarshal(m, b) @@ -473,7 +473,7 @@ func (m *GetFriendApplyListReq) Reset() { *m = GetFriendApplyListReq{} } func (m *GetFriendApplyListReq) String() string { return proto.CompactTextString(m) } func (*GetFriendApplyListReq) ProtoMessage() {} func (*GetFriendApplyListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{9} + return fileDescriptor_friend_74b4824fb8c5de90, []int{9} } func (m *GetFriendApplyListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendApplyListReq.Unmarshal(m, b) @@ -513,7 +513,7 @@ func (m *GetFriendApplyListResp) Reset() { *m = GetFriendApplyListResp{} func (m *GetFriendApplyListResp) String() string { return proto.CompactTextString(m) } func (*GetFriendApplyListResp) ProtoMessage() {} func (*GetFriendApplyListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{10} + return fileDescriptor_friend_74b4824fb8c5de90, []int{10} } func (m *GetFriendApplyListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendApplyListResp.Unmarshal(m, b) @@ -565,7 +565,7 @@ func (m *GetFriendListReq) Reset() { *m = GetFriendListReq{} } func (m *GetFriendListReq) String() string { return proto.CompactTextString(m) } func (*GetFriendListReq) ProtoMessage() {} func (*GetFriendListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{11} + return fileDescriptor_friend_74b4824fb8c5de90, []int{11} } func (m *GetFriendListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListReq.Unmarshal(m, b) @@ -605,7 +605,7 @@ func (m *GetFriendListResp) Reset() { *m = GetFriendListResp{} } func (m *GetFriendListResp) String() string { return proto.CompactTextString(m) } func (*GetFriendListResp) ProtoMessage() {} func (*GetFriendListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{12} + return fileDescriptor_friend_74b4824fb8c5de90, []int{12} } func (m *GetFriendListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetFriendListResp.Unmarshal(m, b) @@ -657,7 +657,7 @@ func (m *AddBlacklistReq) Reset() { *m = AddBlacklistReq{} } func (m *AddBlacklistReq) String() string { return proto.CompactTextString(m) } func (*AddBlacklistReq) ProtoMessage() {} func (*AddBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{13} + return fileDescriptor_friend_74b4824fb8c5de90, []int{13} } func (m *AddBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddBlacklistReq.Unmarshal(m, b) @@ -695,7 +695,7 @@ func (m *AddBlacklistResp) Reset() { *m = AddBlacklistResp{} } func (m *AddBlacklistResp) String() string { return proto.CompactTextString(m) } func (*AddBlacklistResp) ProtoMessage() {} func (*AddBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{14} + return fileDescriptor_friend_74b4824fb8c5de90, []int{14} } func (m *AddBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddBlacklistResp.Unmarshal(m, b) @@ -733,7 +733,7 @@ func (m *RemoveBlacklistReq) Reset() { *m = RemoveBlacklistReq{} } func (m *RemoveBlacklistReq) String() string { return proto.CompactTextString(m) } func (*RemoveBlacklistReq) ProtoMessage() {} func (*RemoveBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{15} + return fileDescriptor_friend_74b4824fb8c5de90, []int{15} } func (m *RemoveBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoveBlacklistReq.Unmarshal(m, b) @@ -771,7 +771,7 @@ func (m *RemoveBlacklistResp) Reset() { *m = RemoveBlacklistResp{} } func (m *RemoveBlacklistResp) String() string { return proto.CompactTextString(m) } func (*RemoveBlacklistResp) ProtoMessage() {} func (*RemoveBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{16} + return fileDescriptor_friend_74b4824fb8c5de90, []int{16} } func (m *RemoveBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_RemoveBlacklistResp.Unmarshal(m, b) @@ -809,7 +809,7 @@ func (m *GetBlacklistReq) Reset() { *m = GetBlacklistReq{} } func (m *GetBlacklistReq) String() string { return proto.CompactTextString(m) } func (*GetBlacklistReq) ProtoMessage() {} func (*GetBlacklistReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{17} + return fileDescriptor_friend_74b4824fb8c5de90, []int{17} } func (m *GetBlacklistReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistReq.Unmarshal(m, b) @@ -849,7 +849,7 @@ func (m *GetBlacklistResp) Reset() { *m = GetBlacklistResp{} } func (m *GetBlacklistResp) String() string { return proto.CompactTextString(m) } func (*GetBlacklistResp) ProtoMessage() {} func (*GetBlacklistResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{18} + return fileDescriptor_friend_74b4824fb8c5de90, []int{18} } func (m *GetBlacklistResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetBlacklistResp.Unmarshal(m, b) @@ -901,7 +901,7 @@ func (m *IsFriendReq) Reset() { *m = IsFriendReq{} } func (m *IsFriendReq) String() string { return proto.CompactTextString(m) } func (*IsFriendReq) ProtoMessage() {} func (*IsFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{19} + return fileDescriptor_friend_74b4824fb8c5de90, []int{19} } func (m *IsFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendReq.Unmarshal(m, b) @@ -941,7 +941,7 @@ func (m *IsFriendResp) Reset() { *m = IsFriendResp{} } func (m *IsFriendResp) String() string { return proto.CompactTextString(m) } func (*IsFriendResp) ProtoMessage() {} func (*IsFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{20} + return fileDescriptor_friend_74b4824fb8c5de90, []int{20} } func (m *IsFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsFriendResp.Unmarshal(m, b) @@ -993,7 +993,7 @@ func (m *IsInBlackListReq) Reset() { *m = IsInBlackListReq{} } func (m *IsInBlackListReq) String() string { return proto.CompactTextString(m) } func (*IsInBlackListReq) ProtoMessage() {} func (*IsInBlackListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{21} + return fileDescriptor_friend_74b4824fb8c5de90, []int{21} } func (m *IsInBlackListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListReq.Unmarshal(m, b) @@ -1033,7 +1033,7 @@ func (m *IsInBlackListResp) Reset() { *m = IsInBlackListResp{} } func (m *IsInBlackListResp) String() string { return proto.CompactTextString(m) } func (*IsInBlackListResp) ProtoMessage() {} func (*IsInBlackListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{22} + return fileDescriptor_friend_74b4824fb8c5de90, []int{22} } func (m *IsInBlackListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_IsInBlackListResp.Unmarshal(m, b) @@ -1085,7 +1085,7 @@ func (m *DeleteFriendReq) Reset() { *m = DeleteFriendReq{} } func (m *DeleteFriendReq) String() string { return proto.CompactTextString(m) } func (*DeleteFriendReq) ProtoMessage() {} func (*DeleteFriendReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{23} + return fileDescriptor_friend_74b4824fb8c5de90, []int{23} } func (m *DeleteFriendReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteFriendReq.Unmarshal(m, b) @@ -1123,7 +1123,7 @@ func (m *DeleteFriendResp) Reset() { *m = DeleteFriendResp{} } func (m *DeleteFriendResp) String() string { return proto.CompactTextString(m) } func (*DeleteFriendResp) ProtoMessage() {} func (*DeleteFriendResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{24} + return fileDescriptor_friend_74b4824fb8c5de90, []int{24} } func (m *DeleteFriendResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteFriendResp.Unmarshal(m, b) @@ -1153,7 +1153,7 @@ func (m *DeleteFriendResp) GetCommonResp() *CommonResp { // process type AddFriendResponseReq struct { CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` - Flag int32 `protobuf:"varint,2,opt,name=flag" json:"flag,omitempty"` + HandleResult int32 `protobuf:"varint,2,opt,name=handleResult" json:"handleResult,omitempty"` HandleMsg string `protobuf:"bytes,3,opt,name=handleMsg" json:"handleMsg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -1164,7 +1164,7 @@ func (m *AddFriendResponseReq) Reset() { *m = AddFriendResponseReq{} } func (m *AddFriendResponseReq) String() string { return proto.CompactTextString(m) } func (*AddFriendResponseReq) ProtoMessage() {} func (*AddFriendResponseReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{25} + return fileDescriptor_friend_74b4824fb8c5de90, []int{25} } func (m *AddFriendResponseReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResponseReq.Unmarshal(m, b) @@ -1191,9 +1191,9 @@ func (m *AddFriendResponseReq) GetCommID() *CommID { return nil } -func (m *AddFriendResponseReq) GetFlag() int32 { +func (m *AddFriendResponseReq) GetHandleResult() int32 { if m != nil { - return m.Flag + return m.HandleResult } return 0 } @@ -1216,7 +1216,7 @@ func (m *AddFriendResponseResp) Reset() { *m = AddFriendResponseResp{} } func (m *AddFriendResponseResp) String() string { return proto.CompactTextString(m) } func (*AddFriendResponseResp) ProtoMessage() {} func (*AddFriendResponseResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{26} + return fileDescriptor_friend_74b4824fb8c5de90, []int{26} } func (m *AddFriendResponseResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_AddFriendResponseResp.Unmarshal(m, b) @@ -1255,7 +1255,7 @@ func (m *SetFriendRemarkReq) Reset() { *m = SetFriendRemarkReq{} } func (m *SetFriendRemarkReq) String() string { return proto.CompactTextString(m) } func (*SetFriendRemarkReq) ProtoMessage() {} func (*SetFriendRemarkReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{27} + return fileDescriptor_friend_74b4824fb8c5de90, []int{27} } func (m *SetFriendRemarkReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetFriendRemarkReq.Unmarshal(m, b) @@ -1300,7 +1300,7 @@ func (m *SetFriendRemarkResp) Reset() { *m = SetFriendRemarkResp{} } func (m *SetFriendRemarkResp) String() string { return proto.CompactTextString(m) } func (*SetFriendRemarkResp) ProtoMessage() {} func (*SetFriendRemarkResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{28} + return fileDescriptor_friend_74b4824fb8c5de90, []int{28} } func (m *SetFriendRemarkResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_SetFriendRemarkResp.Unmarshal(m, b) @@ -1338,7 +1338,7 @@ func (m *GetSelfApplyListReq) Reset() { *m = GetSelfApplyListReq{} } func (m *GetSelfApplyListReq) String() string { return proto.CompactTextString(m) } func (*GetSelfApplyListReq) ProtoMessage() {} func (*GetSelfApplyListReq) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{29} + return fileDescriptor_friend_74b4824fb8c5de90, []int{29} } func (m *GetSelfApplyListReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSelfApplyListReq.Unmarshal(m, b) @@ -1378,7 +1378,7 @@ func (m *GetSelfApplyListResp) Reset() { *m = GetSelfApplyListResp{} } func (m *GetSelfApplyListResp) String() string { return proto.CompactTextString(m) } func (*GetSelfApplyListResp) ProtoMessage() {} func (*GetSelfApplyListResp) Descriptor() ([]byte, []int) { - return fileDescriptor_friend_33f7e79cb4454131, []int{30} + return fileDescriptor_friend_74b4824fb8c5de90, []int{30} } func (m *GetSelfApplyListResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetSelfApplyListResp.Unmarshal(m, b) @@ -1923,68 +1923,68 @@ var _Friend_serviceDesc = grpc.ServiceDesc{ Metadata: "friend/friend.proto", } -func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_33f7e79cb4454131) } - -var fileDescriptor_friend_33f7e79cb4454131 = []byte{ - // 949 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcd, 0x8f, 0xdb, 0x44, - 0x14, 0x97, 0x9b, 0xdd, 0x34, 0x79, 0x49, 0x9b, 0x64, 0x92, 0x2d, 0xc1, 0xdd, 0xad, 0x52, 0x1f, - 0x50, 0xc4, 0x21, 0x91, 0x82, 0x2a, 0xb1, 0x14, 0x0a, 0xe9, 0x26, 0x59, 0x19, 0xd8, 0xa6, 0x9a, - 0x2d, 0x17, 0x84, 0x14, 0xb9, 0xf5, 0x24, 0x58, 0x71, 0xec, 0xa9, 0xc7, 0xdb, 0x8a, 0x2b, 0x27, - 0x0e, 0x5c, 0x91, 0x10, 0x1c, 0xf8, 0x57, 0x91, 0x67, 0xec, 0x78, 0xfc, 0x91, 0x0a, 0x9b, 0x1e, - 0x7a, 0xb2, 0xdf, 0xc7, 0xef, 0xf9, 0x7d, 0xcd, 0x7b, 0x63, 0xe8, 0xae, 0x3d, 0x8b, 0x38, 0xe6, - 0x58, 0x3c, 0x46, 0xd4, 0x73, 0x7d, 0x17, 0x55, 0x05, 0xa5, 0x3e, 0x5c, 0x52, 0xe2, 0xac, 0xf4, - 0xab, 0x31, 0xdd, 0x6e, 0xc6, 0x5c, 0x34, 0x66, 0xe6, 0x76, 0xf5, 0x96, 0x8d, 0xdf, 0x32, 0xa1, - 0xaa, 0x3d, 0x01, 0xb8, 0x70, 0x77, 0x3b, 0xd7, 0xc1, 0x84, 0x51, 0xd4, 0x87, 0xdb, 0xc4, 0xf3, - 0x2e, 0x5c, 0x93, 0xf4, 0x95, 0x81, 0x32, 0x3c, 0xc6, 0x11, 0x89, 0xee, 0x41, 0x95, 0x78, 0xde, - 0x15, 0xdb, 0xf4, 0x6f, 0x0d, 0x94, 0x61, 0x1d, 0x87, 0x94, 0xf6, 0xab, 0x02, 0xd5, 0xc0, 0x80, - 0x3e, 0x43, 0x2a, 0xd4, 0x96, 0xf4, 0x07, 0x46, 0x3c, 0x7d, 0xc6, 0xd1, 0x75, 0xbc, 0xa7, 0xd1, - 0x00, 0x1a, 0x4b, 0x4a, 0x3c, 0xc3, 0xb7, 0x5c, 0x47, 0x9f, 0x85, 0x36, 0x64, 0x56, 0x80, 0x7e, - 0xe1, 0x86, 0xe8, 0x23, 0x81, 0x8e, 0x68, 0xf4, 0x00, 0x60, 0xe1, 0xb9, 0xbb, 0x50, 0x7a, 0xcc, - 0xa5, 0x12, 0x47, 0x7b, 0x0c, 0x9d, 0x4b, 0xe2, 0x2f, 0x78, 0xd0, 0x4c, 0x77, 0xd6, 0x2e, 0x26, - 0xaf, 0xd1, 0x27, 0x91, 0x63, 0xdc, 0x99, 0xc6, 0xe4, 0xee, 0x28, 0xcc, 0x91, 0xe0, 0xe2, 0x50, - 0xaa, 0xfd, 0xae, 0x48, 0x68, 0x01, 0x16, 0x99, 0x98, 0x27, 0x33, 0x31, 0x8f, 0x33, 0x31, 0x4f, - 0x64, 0x42, 0x50, 0x68, 0x0e, 0x77, 0x63, 0x1b, 0xdf, 0x5b, 0xcc, 0xef, 0x57, 0x06, 0x95, 0x61, - 0x63, 0x72, 0x36, 0x62, 0xc4, 0x7b, 0x43, 0xbc, 0x95, 0x41, 0xad, 0x15, 0x35, 0x3c, 0x63, 0xc7, - 0x46, 0xd2, 0xc7, 0x52, 0x20, 0xed, 0x19, 0x34, 0xa7, 0xa6, 0x29, 0x98, 0x05, 0xc2, 0x08, 0xdc, - 0xc2, 0xe4, 0xb5, 0xe4, 0x96, 0xa0, 0xb4, 0x0b, 0xb8, 0x23, 0xd9, 0x63, 0x14, 0x4d, 0xe4, 0x8a, - 0x87, 0x46, 0x91, 0x6c, 0x54, 0x48, 0xb0, 0xa4, 0xa5, 0xfd, 0xad, 0x40, 0x4b, 0xdf, 0x51, 0xd7, - 0xf3, 0x63, 0xc7, 0x3e, 0x85, 0xb6, 0x20, 0x44, 0x11, 0x78, 0xc4, 0xca, 0xa0, 0x32, 0xac, 0xe3, - 0x0c, 0xff, 0x3f, 0x94, 0x3f, 0x59, 0xe2, 0x4a, 0xba, 0xc4, 0x89, 0xe6, 0x3a, 0x4a, 0x36, 0x97, - 0xf6, 0x04, 0x9a, 0xe2, 0x0d, 0x13, 0x76, 0x63, 0xfb, 0x41, 0x2a, 0x12, 0x6d, 0x18, 0x52, 0x22, - 0x45, 0x81, 0x06, 0x77, 0xe0, 0x18, 0x87, 0x94, 0xf6, 0x9b, 0x02, 0xed, 0x64, 0x74, 0xe5, 0xd2, - 0x84, 0xbe, 0x81, 0xb6, 0xec, 0x08, 0x4f, 0xc9, 0x2d, 0xde, 0x04, 0xbd, 0x08, 0x29, 0xcb, 0x71, - 0x46, 0x5b, 0xfb, 0x1a, 0x4e, 0xf6, 0xbd, 0x38, 0xa5, 0xd4, 0xfe, 0x25, 0xe0, 0x16, 0xe9, 0xe6, - 0xbf, 0x14, 0xb8, 0x97, 0x67, 0xa1, 0x54, 0x4b, 0x3f, 0x83, 0xce, 0xbe, 0xde, 0x37, 0x84, 0xf9, - 0x52, 0x57, 0x0f, 0x0e, 0x76, 0x75, 0xa8, 0x8b, 0xb3, 0x50, 0xed, 0x0b, 0x68, 0xef, 0x7d, 0x2b, - 0x1a, 0x58, 0xe2, 0x98, 0xfe, 0x8f, 0x98, 0xde, 0xd3, 0x31, 0x3d, 0x87, 0xd6, 0xd4, 0x34, 0x9f, - 0xda, 0xc6, 0xab, 0xad, 0x5d, 0x30, 0x92, 0x05, 0xb4, 0x93, 0xd0, 0x92, 0x87, 0xf2, 0x4b, 0x40, - 0x98, 0xec, 0xdc, 0x37, 0xa4, 0x94, 0x17, 0x3a, 0x74, 0x33, 0xe8, 0x92, 0x8e, 0x9c, 0x43, 0xeb, - 0x92, 0xf8, 0xa5, 0xbc, 0xf8, 0x43, 0xe1, 0x2d, 0x91, 0xf4, 0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 0x99, 0x42, 0xd3, 0x92, 0x6e, 0xd8, 0x71, 0x80, 0xa9, - 0xbf, 0x8a, 0x38, 0xc0, 0xf4, 0x85, 0xfc, 0x69, 0xe7, 0xc7, 0xd6, 0x28, 0xfc, 0xcd, 0x7d, 0x2c, - 0x1e, 0x2f, 0xab, 0xfc, 0x1f, 0xf6, 0xb3, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x20, 0x88, 0xcd, - 0xd3, 0x05, 0x0f, 0x00, 0x00, +func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_74b4824fb8c5de90) } + +var fileDescriptor_friend_74b4824fb8c5de90 = []byte{ + // 950 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcf, 0x8f, 0xdb, 0x44, + 0x14, 0x96, 0x9b, 0x6e, 0x9a, 0xbc, 0xa4, 0x4d, 0x32, 0xc9, 0x96, 0xe0, 0xee, 0x56, 0xa9, 0x0f, + 0x28, 0xe2, 0x90, 0x48, 0x41, 0x95, 0x58, 0x0a, 0x85, 0x74, 0x93, 0xac, 0x0c, 0x6c, 0x53, 0xcd, + 0x96, 0x0b, 0x42, 0x8a, 0xdc, 0x7a, 0x36, 0x58, 0x71, 0xec, 0xa9, 0xc7, 0xdb, 0x15, 0x37, 0xc4, + 0x89, 0x03, 0x57, 0x24, 0x04, 0x07, 0xfe, 0x55, 0x64, 0x8f, 0x1d, 0xcf, 0xd8, 0xce, 0x0a, 0x9b, + 0x3d, 0x70, 0xda, 0x7d, 0xef, 0xcd, 0xf7, 0xf2, 0x7e, 0xcd, 0xfb, 0xc6, 0xd0, 0xbd, 0xf4, 0x2c, + 0xe2, 0x98, 0x63, 0xfe, 0x67, 0x44, 0x3d, 0xd7, 0x77, 0x51, 0x95, 0x4b, 0xea, 0x93, 0x25, 0x25, + 0xce, 0x4a, 0x3f, 0x1f, 0xd3, 0xcd, 0x7a, 0x1c, 0x9a, 0xc6, 0xcc, 0xdc, 0xac, 0xae, 0xd9, 0xf8, + 0x9a, 0xf1, 0xa3, 0xda, 0x73, 0x80, 0x53, 0x77, 0xbb, 0x75, 0x1d, 0x4c, 0x18, 0x45, 0x7d, 0xb8, + 0x47, 0x3c, 0xef, 0xd4, 0x35, 0x49, 0x5f, 0x19, 0x28, 0xc3, 0x03, 0x1c, 0x8b, 0xe8, 0x21, 0x54, + 0x89, 0xe7, 0x9d, 0xb3, 0x75, 0xff, 0xce, 0x40, 0x19, 0xd6, 0x71, 0x24, 0x69, 0xbf, 0x28, 0x50, + 0x0d, 0x1c, 0xe8, 0x33, 0xa4, 0x42, 0x6d, 0x49, 0xbf, 0x63, 0xc4, 0xd3, 0x67, 0x21, 0xba, 0x8e, + 0x77, 0x32, 0x1a, 0x40, 0x63, 0x49, 0x89, 0x67, 0xf8, 0x96, 0xeb, 0xe8, 0xb3, 0xc8, 0x87, 0xa8, + 0x0a, 0xd0, 0xaf, 0xdd, 0x08, 0x7d, 0x97, 0xa3, 0x63, 0x19, 0x3d, 0x06, 0x58, 0x78, 0xee, 0x36, + 0xb2, 0x1e, 0x84, 0x56, 0x41, 0xa3, 0x3d, 0x83, 0xce, 0x19, 0xf1, 0x17, 0x61, 0xd2, 0x4c, 0x77, + 0x2e, 0x5d, 0x4c, 0xde, 0xa1, 0x8f, 0xe2, 0xc0, 0xc2, 0x60, 0x1a, 0x93, 0x07, 0xa3, 0xa8, 0x46, + 0x5c, 0x8b, 0x23, 0xab, 0xf6, 0x9b, 0x22, 0xa0, 0x39, 0x98, 0x57, 0x62, 0x2e, 0x57, 0x62, 0x9e, + 0x54, 0x62, 0x2e, 0x55, 0x82, 0x4b, 0x68, 0x0e, 0x0f, 0x12, 0x1f, 0xdf, 0x5a, 0xcc, 0xef, 0x57, + 0x06, 0x95, 0x61, 0x63, 0x72, 0x3c, 0x62, 0xc4, 0x7b, 0x4f, 0xbc, 0x95, 0x41, 0xad, 0x15, 0x35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4e, 0x4b, 0x6a, 0x91, 0x62, 0x49, 0xb5, 0x9f, 0x6f, 0xe0, 0x2e, 0x4c, 0x61, + 0x21, 0x26, 0x2e, 0x52, 0x1b, 0x36, 0x71, 0x91, 0xd9, 0x9f, 0xaf, 0xa0, 0x63, 0xa4, 0x17, 0x11, + 0x3a, 0xca, 0x9d, 0xd3, 0x68, 0x4b, 0xaa, 0xc7, 0x37, 0x58, 0x79, 0x83, 0x98, 0xbc, 0x37, 0x92, + 0x06, 0x65, 0xd7, 0x54, 0xd2, 0xa0, 0xbc, 0x65, 0x33, 0x85, 0xa6, 0x25, 0x3c, 0xb9, 0x93, 0x04, + 0x53, 0x9f, 0x19, 0x49, 0x82, 0xe9, 0x17, 0xfa, 0x8b, 0xce, 0xf7, 0xad, 0x51, 0xf4, 0xdd, 0xfb, + 0x8c, 0xff, 0x79, 0x53, 0x0d, 0x3f, 0x6a, 0x3f, 0xf9, 0x27, 0x00, 0x00, 0xff, 0xff, 0x26, 0xd5, + 0xdf, 0x90, 0x16, 0x0f, 0x00, 0x00, } diff --git a/pkg/proto/friend/friend.proto b/pkg/proto/friend/friend.proto index 1baf29c10..0050582d1 100644 --- a/pkg/proto/friend/friend.proto +++ b/pkg/proto/friend/friend.proto @@ -127,7 +127,7 @@ message DeleteFriendResp{ //process message AddFriendResponseReq{ CommID CommID = 1; - int32 flag = 2; + int32 handleResult = 2; string handleMsg = 3; } message AddFriendResponseResp{ diff --git a/pkg/proto/sdk_ws/ws.proto b/pkg/proto/sdk_ws/ws.proto index 5b235f5d8..ed7d7b739 100644 --- a/pkg/proto/sdk_ws/ws.proto +++ b/pkg/proto/sdk_ws/ws.proto @@ -223,27 +223,63 @@ message TipsComm{ } //////////////////////group///////////////////// -//Actively join the group -message MemberEnterTips{ + + +// OnGroupCreated() +message GroupCreatedTips{ GroupInfo group = 1; - GroupMemberFullInfo entrantUser = 2; - int64 operationTime = 3; + GroupMemberFullInfo creator = 2; + repeated GroupMemberFullInfo memberList = 3; + int64 operationTime = 4; +} + +// OnGroupInfoSet() +message MemberInfoSetTips{ + GroupMemberFullInfo opUser = 1; //who do this + int64 muteTime = 2; + GroupInfo group = 3; } +// OnJoinGroupApplication() +message JoinGroupApplicationTips{ + GroupInfo group = 1; + PublicUserInfo applicant = 2; + string reason = 3; +} + +// OnQuitGroup() //Actively leave the group -message MemberLeaveTips{ +message MemberQuitTips{ GroupInfo group = 1; - GroupMemberFullInfo leaverUser = 2; + GroupMemberFullInfo quitUser = 2; int64 operationTime = 3; } -message MemberInvitedTips{ + +// OnApplicationGroupAccepted() +message GroupApplicationAcceptedTips{ GroupInfo group = 1; GroupMemberFullInfo opUser = 2; - repeated GroupMemberFullInfo invitedUserList = 3; + string handleMsg = 4; +} + +// OnApplicationGroupRejected() +message GroupApplicationRejectedTips{ + GroupInfo group = 1; + GroupMemberFullInfo opUser = 2; + string handleMsg = 4; +} + +// OnTransferGroupOwner() +message GroupOwnerTransferredTips{ + GroupInfo group = 1; + GroupMemberFullInfo opUser = 2; + GroupMemberFullInfo newGroupOwner = 3; int64 operationTime = 4; } + +// OnMemberKicked() message MemberKickedTips{ GroupInfo group = 1; GroupMemberFullInfo opUser = 2; @@ -251,21 +287,28 @@ message MemberKickedTips{ int64 operationTime = 4; } -message MemberInfoChangedTips{ - int32 changeType = 1; ///bitwise operators 0001:member info changed; 0010:mute ; - GroupMemberFullInfo opUser = 2; //who do this - GroupMemberFullInfo finalInfo = 3; // - int64 muteTime = 4; - GroupInfo group = 5; -} - -message GroupCreatedTips{ +// OnMemberInvited() +message MemberInvitedTips{ GroupInfo group = 1; - GroupMemberFullInfo creator = 2; - repeated GroupMemberFullInfo memberList = 3; + GroupMemberFullInfo opUser = 2; + repeated GroupMemberFullInfo invitedUserList = 3; int64 operationTime = 4; } +//Actively join the group +//message MemberEnterTips{ +// GroupInfo group = 1; +// GroupMemberFullInfo entrantUser = 2; +// int64 operationTime = 3; +//} + + + + + + + + message GroupInfoChangedTips{ int32 changedType = 1; //bitwise operators: 0001:groupName; 0010:Notification 0100:Introduction; 1000:FaceUrl GroupInfo group = 2; @@ -278,12 +321,10 @@ message JoinGroupApplicationTips{ string reason = 3; } -message ApplicationProcessedTips{ - GroupInfo group = 1; - GroupMemberFullInfo opUser = 2; - int32 result = 3; - string reason = 4; -} + + + + //////////////////////friend///////////////////// //message FriendInfo{