Refactor code

This commit is contained in:
wenxu12345 2022-01-16 12:25:41 +08:00
parent 7e13cc84c8
commit 87f14be30c
8 changed files with 637 additions and 354 deletions

View File

@ -178,7 +178,7 @@ iOSPush:
notification: notification:
groupCreated: groupCreated:
conversation: conversation:
type: 1 reliabilityLevel: 1
unreadCount: true unreadCount: true
offlinePush: offlinePush:
switch: true switch: true
@ -191,7 +191,7 @@ notification:
groupInfoChanged: groupInfoChanged:
conversation: conversation:
type: 1 reliabilityLevel: 1
unreadCount: false unreadCount: false
offlinePush: offlinePush:
switch: false 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---------------------# #---------------demo configuration---------------------#
#The following configuration items are applied to openIM Demo configuration #The following configuration items are applied to openIM Demo configuration
demoswitch: true demoswitch: true

View File

@ -1,6 +1,7 @@
package msg package msg
import ( import (
"Open_IM/pkg/common/config"
"Open_IM/pkg/common/constant" "Open_IM/pkg/common/constant"
imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model"
"Open_IM/pkg/common/log" "Open_IM/pkg/common/log"
@ -40,70 +41,133 @@ func getFromToUserNickname(fromUserID, toUserID string) (string, string, error)
return from.Nickname, to.Nickname, nil return from.Nickname, to.Nickname, nil
} }
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(commID.OperationID, "Marshal failed ", err.Error(), m.String())
return
}
fromUserNickname, toUserNickname, err := getFromToUserNickname(commID.FromUserID, commID.ToUserID)
if err != nil {
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
}
var n NotificationMsg
n.SendID = commID.FromUserID
n.RecvID = commID.ToUserID
n.ContentType = contentType
n.SessionType = constant.SingleChatType
n.MsgFrom = constant.SysMsgType
n.OperationID = commID.OperationID
n.Content, err = proto.Marshal(&tips)
if err != nil {
log.Error(commID.OperationID, "Marshal failed ", err.Error(), tips.String())
return
}
Notification(&n)
}
func FriendApplicationAddedNotification(req *pbFriend.AddFriendReq) { func FriendApplicationAddedNotification(req *pbFriend.AddFriendReq) {
log.Info(req.CommID.OperationID, utils.GetSelfFuncName(), "args: ", req.String()) log.Info(req.CommID.OperationID, utils.GetSelfFuncName(), "args: ", req.String())
var friendApplicationAddedTips open_im_sdk.FriendApplicationAddedTips var friendApplicationAddedTips open_im_sdk.FriendApplicationAddedTips
friendApplicationAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID friendApplicationAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID
friendApplicationAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID friendApplicationAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID
fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) friendNotification(req.CommID, constant.FriendApplicationAddedNotification, &friendApplicationAddedTips)
if err != nil { //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID)
log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) //if err != nil {
return // 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) //var tips open_im_sdk.TipsComm
if err != nil { //tips.Detail, err = proto.Marshal(&friendApplicationAddedTips)
log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendApplicationAddedTips.String()) //if err != nil {
return // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendApplicationAddedTips.String())
} // return
tips.DefaultTips = fromUserNickname + " FriendApplicationAddedNotification " + toUserNickname //}
//tips.DefaultTips = fromUserNickname + " FriendApplicationAddedNotification " + toUserNickname
var n NotificationMsg //
n.SendID = req.CommID.FromUserID //var n NotificationMsg
n.RecvID = req.CommID.ToUserID //n.SendID = req.CommID.FromUserID
n.ContentType = constant.FriendApplicationAddedNotification //n.RecvID = req.CommID.ToUserID
n.SessionType = constant.SingleChatType //n.ContentType = constant.FriendApplicationAddedNotification
n.MsgFrom = constant.SysMsgType //n.SessionType = constant.SingleChatType
n.OperationID = req.CommID.OperationID //n.MsgFrom = constant.SysMsgType
n.Content, err = proto.Marshal(&tips) //n.OperationID = req.CommID.OperationID
if err != nil { //n.Content, err = proto.Marshal(&tips)
log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) //if err != nil {
return // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String())
} // return
Notification(&n) //}
//Notification(&n)
} }
func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) { func FriendApplicationProcessedNotification(req *pbFriend.AddFriendResponseReq) {
var friendApplicationProcessedTips open_im_sdk.FriendApplicationProcessedTips var friendApplicationProcessedTips open_im_sdk.FriendApplicationProcessedTips
friendApplicationProcessedTips.FromToUserID.FromUserID = req.CommID.FromUserID friendApplicationProcessedTips.FromToUserID.FromUserID = req.CommID.FromUserID
friendApplicationProcessedTips.FromToUserID.ToUserID = req.CommID.ToUserID friendApplicationProcessedTips.FromToUserID.ToUserID = req.CommID.ToUserID
fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) friendApplicationProcessedTips.HandleResult = req.HandleResult
if err != nil { //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID)
log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) //if err != nil {
return // 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 //var tips open_im_sdk.TipsComm
tips.Detail, err = proto.Marshal(&friendApplicationProcessedTips) //tips.DefaultTips = fromUserNickname + " FriendApplicationProcessedNotification " + toUserNickname
if err != nil { //tips.Detail, err = proto.Marshal(&friendApplicationProcessedTips)
log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendApplicationProcessedTips.String()) //if err != nil {
return // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendApplicationProcessedTips.String())
} // return
tips.DefaultTips = fromUserNickname + " FriendApplicationProcessedNotification " + toUserNickname //}
//
var n NotificationMsg //var n NotificationMsg
n.SendID = req.CommID.FromUserID //n.SendID = req.CommID.FromUserID
n.RecvID = req.CommID.ToUserID //n.RecvID = req.CommID.ToUserID
n.ContentType = constant.FriendApplicationProcessedNotification //n.ContentType = constant.FriendApplicationProcessedNotification
n.SessionType = constant.SingleChatType //n.SessionType = constant.SingleChatType
n.MsgFrom = constant.SysMsgType //n.MsgFrom = constant.SysMsgType
n.OperationID = req.CommID.OperationID //n.OperationID = req.CommID.OperationID
n.Content, err = proto.Marshal(&tips) //n.Content, err = proto.Marshal(&tips)
if err != nil { //if err != nil {
log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String())
return // return
} //}
Notification(&n) //Notification(&n)
} }
func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) { func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string) {
@ -120,31 +184,34 @@ func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string)
return return
} }
utils2.FriendDBCopyOpenIM(friendAddedTips.Friend, friend) utils2.FriendDBCopyOpenIM(friendAddedTips.Friend, friend)
fromUserNickname, toUserNickname, err := getFromToUserNickname(fromUserID, toUserID) commID := pbFriend.CommID{FromUserID: fromUserID, ToUserID: toUserID, OpUserID: opUserID, OperationID: operationID}
if err != nil { friendNotification(&commID, constant.FriendAddedNotification, &friendAddedTips)
log.Error(operationID, "getFromToUserNickname failed ", err.Error(), fromUserID, toUserID) //fromUserNickname, toUserNickname, err := getFromToUserNickname(fromUserID, toUserID)
return //if err != nil {
} // log.Error(operationID, "getFromToUserNickname failed ", err.Error(), fromUserID, toUserID)
var tips open_im_sdk.TipsComm // return
tips.Detail, err = proto.Marshal(&friendAddedTips) //}
if err != nil { //var tips open_im_sdk.TipsComm
log.Error(operationID, "Marshal failed ", err.Error(), friendAddedTips) //tips.DefaultTips = fromUserNickname + " FriendAddedNotification " + toUserNickname
return //tips.Detail, err = proto.Marshal(&friendAddedTips)
} //if err != nil {
tips.DefaultTips = fromUserNickname + " FriendAddedNotification " + toUserNickname // log.Error(operationID, "Marshal failed ", err.Error(), friendAddedTips)
var n NotificationMsg // return
n.SendID = fromUserID //}
n.RecvID = toUserID //
n.ContentType = constant.FriendAddedNotification //var n NotificationMsg
n.SessionType = constant.SingleChatType //n.SendID = fromUserID
n.MsgFrom = constant.SysMsgType //n.RecvID = toUserID
n.OperationID = operationID //n.ContentType = constant.FriendAddedNotification
n.Content, _ = proto.Marshal(&tips) //n.SessionType = constant.SingleChatType
if err != nil { //n.MsgFrom = constant.SysMsgType
log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) //n.OperationID = operationID
return //n.Content, err = proto.Marshal(&tips)
} //if err != nil {
Notification(&n) // log.Error(operationID, "Marshal failed ", err.Error(), tips.String())
// return
//}
//Notification(&n)
} }
//message FriendDeletedTips{ //message FriendDeletedTips{
@ -154,31 +221,33 @@ func FriendDeletedNotification(req *pbFriend.DeleteFriendReq) {
var friendDeletedTips open_im_sdk.FriendDeletedTips var friendDeletedTips open_im_sdk.FriendDeletedTips
friendDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID friendDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID
friendDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID friendDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID
fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID)
if err != nil { //if err != nil {
log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", req.CommID.FromUserID, req.CommID.ToUserID) // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", req.CommID.FromUserID, req.CommID.ToUserID)
return // return
} //}
var tips open_im_sdk.TipsComm friendNotification(req.CommID, constant.FriendDeletedNotification, &friendDeletedTips)
tips.Detail, err = proto.Marshal(&friendDeletedTips) //var tips open_im_sdk.TipsComm
if err != nil { //tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname
log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendDeletedTips.String()) //tips.Detail, err = proto.Marshal(&friendDeletedTips)
return //if err != nil {
} // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), friendDeletedTips.String())
tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname // return
var n NotificationMsg //}
n.SendID = req.CommID.FromUserID //
n.RecvID = req.CommID.ToUserID //var n NotificationMsg
n.ContentType = constant.FriendDeletedNotification //n.SendID = req.CommID.FromUserID
n.SessionType = constant.SingleChatType //n.RecvID = req.CommID.ToUserID
n.MsgFrom = constant.SysMsgType //n.ContentType = constant.FriendDeletedNotification
n.OperationID = req.CommID.OperationID //n.SessionType = constant.SingleChatType
n.Content, err = proto.Marshal(&tips) //n.MsgFrom = constant.SysMsgType
if err != nil { //n.OperationID = req.CommID.OperationID
log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) //n.Content, err = proto.Marshal(&tips)
return //if err != nil {
} // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String())
Notification(&n) // return
//}
//Notification(&n)
} }
//message FriendInfoChangedTips{ //message FriendInfoChangedTips{
@ -190,63 +259,66 @@ func FriendInfoChangedNotification(operationID, opUserID, fromUserID, toUserID s
var friendInfoChangedTips open_im_sdk.FriendInfoChangedTips var friendInfoChangedTips open_im_sdk.FriendInfoChangedTips
friendInfoChangedTips.FromToUserID.FromUserID = fromUserID friendInfoChangedTips.FromToUserID.FromUserID = fromUserID
friendInfoChangedTips.FromToUserID.ToUserID = toUserID friendInfoChangedTips.FromToUserID.ToUserID = toUserID
fromUserNickname, toUserNickname, err := getFromToUserNickname(fromUserID, toUserID) //fromUserNickname, toUserNickname, err := getFromToUserNickname(fromUserID, toUserID)
if err != nil { //if err != nil {
log.Error(operationID, "getFromToUserNickname failed ", fromUserID, toUserID) // log.Error(operationID, "getFromToUserNickname failed ", fromUserID, toUserID)
return // return
} //}
var tips open_im_sdk.TipsComm commID := pbFriend.CommID{FromUserID: fromUserID, ToUserID: toUserID, OpUserID: opUserID, OperationID: operationID}
tips.Detail, err = proto.Marshal(&friendInfoChangedTips) friendNotification(&commID, constant.FriendInfoChangedNotification, &friendInfoChangedTips)
if err != nil { //var tips open_im_sdk.TipsComm
log.Error(operationID, "Marshal failed ", err.Error(), friendInfoChangedTips.String()) //tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname
return //tips.Detail, err = proto.Marshal(&friendInfoChangedTips)
} //if err != nil {
tips.DefaultTips = fromUserNickname + " FriendDeletedNotification " + toUserNickname // log.Error(operationID, "Marshal failed ", err.Error(), friendInfoChangedTips.String())
var n NotificationMsg // return
n.SendID = fromUserID //}
n.RecvID = toUserID //
n.ContentType = constant.FriendInfoChangedNotification //var n NotificationMsg
n.SessionType = constant.SingleChatType //n.SendID = fromUserID
n.MsgFrom = constant.SysMsgType //n.RecvID = toUserID
n.OperationID = operationID //n.ContentType = constant.FriendInfoChangedNotification
//n.SessionType = constant.SingleChatType
n.Content, err = proto.Marshal(&tips) //n.MsgFrom = constant.SysMsgType
if err != nil { //n.OperationID = operationID
log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) //n.Content, err = proto.Marshal(&tips)
return //if err != nil {
} // log.Error(operationID, "Marshal failed ", err.Error(), tips.String())
Notification(&n) // return
//}
//Notification(&n)
} }
func BlackAddedNotification(req *pbFriend.AddBlacklistReq) { func BlackAddedNotification(req *pbFriend.AddBlacklistReq) {
var blackAddedTips open_im_sdk.BlackAddedTips var blackAddedTips open_im_sdk.BlackAddedTips
blackAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID blackAddedTips.FromToUserID.FromUserID = req.CommID.FromUserID
blackAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID blackAddedTips.FromToUserID.ToUserID = req.CommID.ToUserID
fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID)
if err != nil { //if err != nil {
log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", req.CommID.FromUserID, req.CommID.ToUserID) // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", req.CommID.FromUserID, req.CommID.ToUserID)
return // return
} //}
var tips open_im_sdk.TipsComm //var tips open_im_sdk.TipsComm
tips.Detail, err = proto.Marshal(&blackAddedTips) //tips.DefaultTips = fromUserNickname + " BlackAddedNotification " + toUserNickname
if err != nil { //tips.Detail, err = proto.Marshal(&blackAddedTips)
log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), blackAddedTips.String()) //if err != nil {
return // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), blackAddedTips.String())
} // return
tips.DefaultTips = fromUserNickname + " BlackAddedNotification " + toUserNickname //}
var n NotificationMsg friendNotification(req.CommID, constant.BlackAddedNotification, &blackAddedTips)
n.SendID = req.CommID.FromUserID //var n NotificationMsg
n.RecvID = req.CommID.ToUserID //n.SendID = req.CommID.FromUserID
n.ContentType = constant.BlackAddedNotification //n.RecvID = req.CommID.ToUserID
n.SessionType = constant.SingleChatType //n.ContentType = constant.BlackAddedNotification
n.MsgFrom = constant.SysMsgType //n.SessionType = constant.SingleChatType
n.OperationID = req.CommID.OperationID //n.MsgFrom = constant.SysMsgType
n.Content, err = proto.Marshal(&tips) //n.OperationID = req.CommID.OperationID
if err != nil { //n.Content, err = proto.Marshal(&tips)
log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) //if err != nil {
return // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String())
} // return
Notification(&n) //}
//Notification(&n)
} }
//message BlackDeletedTips{ //message BlackDeletedTips{
@ -256,31 +328,32 @@ func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) {
var blackDeletedTips open_im_sdk.BlackDeletedTips var blackDeletedTips open_im_sdk.BlackDeletedTips
blackDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID blackDeletedTips.FromToUserID.FromUserID = req.CommID.FromUserID
blackDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID blackDeletedTips.FromToUserID.ToUserID = req.CommID.ToUserID
fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID) //fromUserNickname, toUserNickname, err := getFromToUserNickname(req.CommID.FromUserID, req.CommID.ToUserID)
if err != nil { //if err != nil {
log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID) // log.Error(req.CommID.OperationID, "getFromToUserNickname failed ", err.Error(), req.CommID.FromUserID, req.CommID.ToUserID)
return // return
} //}
var tips open_im_sdk.TipsComm //var tips open_im_sdk.TipsComm
tips.Detail, err = proto.Marshal(&blackDeletedTips) //tips.Detail, err = proto.Marshal(&blackDeletedTips)
if err != nil { //if err != nil {
log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), blackDeletedTips.String()) // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), blackDeletedTips.String())
return // return
} //}
tips.DefaultTips = fromUserNickname + " BlackDeletedNotification " + toUserNickname friendNotification(req.CommID, constant.BlackDeletedNotification, &blackDeletedTips)
var n NotificationMsg //tips.DefaultTips = fromUserNickname + " BlackDeletedNotification " + toUserNickname
n.SendID = req.CommID.FromUserID //var n NotificationMsg
n.RecvID = req.CommID.ToUserID //n.SendID = req.CommID.FromUserID
n.ContentType = constant.BlackDeletedNotification //n.RecvID = req.CommID.ToUserID
n.SessionType = constant.SingleChatType //n.ContentType = constant.BlackDeletedNotification
n.MsgFrom = constant.SysMsgType //n.SessionType = constant.SingleChatType
n.OperationID = req.CommID.OperationID //n.MsgFrom = constant.SysMsgType
n.Content, err = proto.Marshal(&tips) //n.OperationID = req.CommID.OperationID
if err != nil { //n.Content, err = proto.Marshal(&tips)
log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String()) //if err != nil {
return // log.Error(req.CommID.OperationID, "Marshal failed ", err.Error(), tips.String())
} // return
Notification(&n) //}
//Notification(&n)
} }
//message SelfInfoUpdatedTips{ //message SelfInfoUpdatedTips{
@ -288,33 +361,35 @@ func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq) {
// PublicUserInfo OpUser = 2; // PublicUserInfo OpUser = 2;
// uint64 OperationTime = 3; // uint64 OperationTime = 3;
//} //}
func SelfInfoUpdatedNotification(operationID, userID string) { func SelfInfoUpdatedNotification(operationID, userID string, opUserID string) {
var selfInfoUpdatedTips open_im_sdk.SelfInfoUpdatedTips var selfInfoUpdatedTips open_im_sdk.SelfInfoUpdatedTips
selfInfoUpdatedTips.UserID = userID selfInfoUpdatedTips.UserID = userID
u, err := imdb.GetUserByUserID(userID) commID := pbFriend.CommID{FromUserID: userID, ToUserID: userID, OpUserID: opUserID, OperationID: operationID}
if err != nil { friendNotification(&commID, constant.SelfInfoUpdatedNotification, &selfInfoUpdatedTips)
log.NewError(operationID, "FindUserByUID failed ", err.Error(), userID) //u, err := imdb.GetUserByUserID(userID)
return //if err != nil {
} // log.NewError(operationID, "FindUserByUID failed ", err.Error(), userID)
var tips open_im_sdk.TipsComm // return
tips.Detail, err = proto.Marshal(&selfInfoUpdatedTips) //}
if err != nil { //var tips open_im_sdk.TipsComm
log.Error(operationID, "Marshal failed ", err.Error(), selfInfoUpdatedTips.String()) //tips.Detail, err = proto.Marshal(&selfInfoUpdatedTips)
return //if err != nil {
} // log.Error(operationID, "Marshal failed ", err.Error(), selfInfoUpdatedTips.String())
var n NotificationMsg // return
n.SendID = userID //}
n.RecvID = userID //var n NotificationMsg
n.ContentType = constant.SelfInfoUpdatedNotification //n.SendID = userID
n.SessionType = constant.SingleChatType //n.RecvID = userID
n.MsgFrom = constant.SysMsgType //n.ContentType = constant.SelfInfoUpdatedNotification
n.OperationID = operationID //n.SessionType = constant.SingleChatType
//n.MsgFrom = constant.SysMsgType
tips.DefaultTips = u.Nickname + " SelfInfoUpdatedNotification " //n.OperationID = operationID
n.Content, err = proto.Marshal(&tips) //
if err != nil { //tips.DefaultTips = u.Nickname + " SelfInfoUpdatedNotification "
log.Error(operationID, "Marshal failed ", err.Error(), tips.String()) //n.Content, err = proto.Marshal(&tips)
return //if err != nil {
} // log.Error(operationID, "Marshal failed ", err.Error(), tips.String())
Notification(&n) // return
//}
//Notification(&n)
} }

View File

@ -237,6 +237,6 @@ func (s *userServer) UpdateUserInfo(ctx context.Context, req *pbUser.UpdateUserI
for _, v := range RpcResp.FriendInfoList { for _, v := range RpcResp.FriendInfoList {
chat.FriendInfoChangedNotification(req.OperationID, req.OpUserID, req.UserInfo.UserID, v.FriendUser.UserID) 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 return &pbUser.UpdateUserInfoResp{CommonResp: &pbUser.CommonResp{}}, nil
} }

View File

@ -181,6 +181,51 @@ type config struct {
OfflinePush POfflinePush `yaml:"offlinePush"` OfflinePush POfflinePush `yaml:"offlinePush"`
DefaultTips PDefaultTips `yaml:"defaultTips"` 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 { Demo struct {
Port []int `yaml:"openImDemoPort"` Port []int `yaml:"openImDemoPort"`
@ -201,8 +246,8 @@ type config struct {
} }
} }
type PConversation struct { type PConversation struct {
ConversationChanged bool `yaml:"conversationChanged"` ReliabilityLevel int `yaml:"reliabilityLevel"`
UnreadCount bool `yaml:"unreadCount"` UnreadCount bool `yaml:"unreadCount"`
} }
type POfflinePush struct { type POfflinePush struct {

View File

@ -46,24 +46,35 @@ const (
//SysRelated //SysRelated
FriendApplicationProcessedNotification = 1201 //AcceptFriendApplicationTip = 201 FriendApplicationApprovedNotification = 1201
FriendApplicationAddedNotification = 1202 //AddFriendTip = 202 FriendApplicationRejectedNotification = 1202
FriendAddedNotification = 1203 FriendApplicationAddedNotification = 1203 //AddFriendTip = 202
FriendDeletedNotification = 1204 FriendAddedNotification = 1204
FriendInfoChangedNotification = 1205 FriendDeletedNotification = 1205
BlackAddedNotification = 1206 FriendInfoChangedNotification = 1206
BlackDeletedNotification = 1207 BlackAddedNotification = 1207
BlackDeletedNotification = 1208
SelfInfoUpdatedNotification = 1303 //SetSelfInfoTip = 204 SelfInfoUpdatedNotification = 1303 //SetSelfInfoTip = 204
GroupCreatedNotification = 1501 //CreateGroupTip = 502 GroupCreatedNotification = 1501
JoinApplicationNotification = 1502 //JoinGroupTip = 504 MemberInfoSetNotification = 1501
ApplicationProcessedNotification = 1503 //AcceptGroupApplicationTip = 507 RefuseGroupApplicationTip = 508 JoinGroupApplicationNotification = 1501
MemberInvitedNotification = 1504 //InviteUserToGroupTip = 510 MemberQuitNotification = 1501
MemberKickedNotification = 1505 //KickGroupMemberTip = 509 GroupApplicationAcceptedNotification = 1501
GroupInfoChangedNotification = 1506 //SetGroupInfoTip = 506 TransferGroupOwnerTip = 501 GroupApplicationRejectedNotification = 1501
MemberLeaveNotification = 1507 //QuitGroupTip = 505 GroupOwnerTransferredNotification = 1501
MemberEnterNotification = 1508 MemberKickedNotification = 1501
MemberInvitedNotification = 1501
//GroupCreatedNotification = 1501
//JoinApplicationNotification = 1502
//ApplicationProcessedNotification = 1503
//MemberInvitedNotification = 1504
//MemberKickedNotification = 1505
//GroupInfoChangedNotification = 1506
//MemberLeaveNotification = 1507
//MemberEnterNotification = 1508
//MsgFrom //MsgFrom
UserMsgType = 100 UserMsgType = 100

View File

@ -36,7 +36,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} }
func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (m *CommonResp) String() string { return proto.CompactTextString(m) }
func (*CommonResp) ProtoMessage() {} func (*CommonResp) ProtoMessage() {}
func (*CommonResp) Descriptor() ([]byte, []int) { 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 { func (m *CommonResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CommonResp.Unmarshal(m, b) 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 (m *CommID) String() string { return proto.CompactTextString(m) }
func (*CommID) ProtoMessage() {} func (*CommID) ProtoMessage() {}
func (*CommID) Descriptor() ([]byte, []int) { 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 { func (m *CommID) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CommID.Unmarshal(m, b) 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 (m *GetFriendsInfoReq) String() string { return proto.CompactTextString(m) }
func (*GetFriendsInfoReq) ProtoMessage() {} func (*GetFriendsInfoReq) ProtoMessage() {}
func (*GetFriendsInfoReq) Descriptor() ([]byte, []int) { 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 { func (m *GetFriendsInfoReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetFriendsInfoReq.Unmarshal(m, b) 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 (m *GetFriendInfoResp) String() string { return proto.CompactTextString(m) }
func (*GetFriendInfoResp) ProtoMessage() {} func (*GetFriendInfoResp) ProtoMessage() {}
func (*GetFriendInfoResp) Descriptor() ([]byte, []int) { 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 { func (m *GetFriendInfoResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetFriendInfoResp.Unmarshal(m, b) 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 (m *AddFriendReq) String() string { return proto.CompactTextString(m) }
func (*AddFriendReq) ProtoMessage() {} func (*AddFriendReq) ProtoMessage() {}
func (*AddFriendReq) Descriptor() ([]byte, []int) { 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 { func (m *AddFriendReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddFriendReq.Unmarshal(m, b) 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 (m *AddFriendResp) String() string { return proto.CompactTextString(m) }
func (*AddFriendResp) ProtoMessage() {} func (*AddFriendResp) ProtoMessage() {}
func (*AddFriendResp) Descriptor() ([]byte, []int) { 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 { func (m *AddFriendResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddFriendResp.Unmarshal(m, b) 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 (m *ImportFriendReq) String() string { return proto.CompactTextString(m) }
func (*ImportFriendReq) ProtoMessage() {} func (*ImportFriendReq) ProtoMessage() {}
func (*ImportFriendReq) Descriptor() ([]byte, []int) { 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 { func (m *ImportFriendReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImportFriendReq.Unmarshal(m, b) 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 (m *UserIDResult) String() string { return proto.CompactTextString(m) }
func (*UserIDResult) ProtoMessage() {} func (*UserIDResult) ProtoMessage() {}
func (*UserIDResult) Descriptor() ([]byte, []int) { 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 { func (m *UserIDResult) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UserIDResult.Unmarshal(m, b) 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 (m *ImportFriendResp) String() string { return proto.CompactTextString(m) }
func (*ImportFriendResp) ProtoMessage() {} func (*ImportFriendResp) ProtoMessage() {}
func (*ImportFriendResp) Descriptor() ([]byte, []int) { 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 { func (m *ImportFriendResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImportFriendResp.Unmarshal(m, b) 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 (m *GetFriendApplyListReq) String() string { return proto.CompactTextString(m) }
func (*GetFriendApplyListReq) ProtoMessage() {} func (*GetFriendApplyListReq) ProtoMessage() {}
func (*GetFriendApplyListReq) Descriptor() ([]byte, []int) { 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 { func (m *GetFriendApplyListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetFriendApplyListReq.Unmarshal(m, b) 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 (m *GetFriendApplyListResp) String() string { return proto.CompactTextString(m) }
func (*GetFriendApplyListResp) ProtoMessage() {} func (*GetFriendApplyListResp) ProtoMessage() {}
func (*GetFriendApplyListResp) Descriptor() ([]byte, []int) { 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 { func (m *GetFriendApplyListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetFriendApplyListResp.Unmarshal(m, b) 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 (m *GetFriendListReq) String() string { return proto.CompactTextString(m) }
func (*GetFriendListReq) ProtoMessage() {} func (*GetFriendListReq) ProtoMessage() {}
func (*GetFriendListReq) Descriptor() ([]byte, []int) { 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 { func (m *GetFriendListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetFriendListReq.Unmarshal(m, b) 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 (m *GetFriendListResp) String() string { return proto.CompactTextString(m) }
func (*GetFriendListResp) ProtoMessage() {} func (*GetFriendListResp) ProtoMessage() {}
func (*GetFriendListResp) Descriptor() ([]byte, []int) { 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 { func (m *GetFriendListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetFriendListResp.Unmarshal(m, b) 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 (m *AddBlacklistReq) String() string { return proto.CompactTextString(m) }
func (*AddBlacklistReq) ProtoMessage() {} func (*AddBlacklistReq) ProtoMessage() {}
func (*AddBlacklistReq) Descriptor() ([]byte, []int) { 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 { func (m *AddBlacklistReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddBlacklistReq.Unmarshal(m, b) 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 (m *AddBlacklistResp) String() string { return proto.CompactTextString(m) }
func (*AddBlacklistResp) ProtoMessage() {} func (*AddBlacklistResp) ProtoMessage() {}
func (*AddBlacklistResp) Descriptor() ([]byte, []int) { 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 { func (m *AddBlacklistResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddBlacklistResp.Unmarshal(m, b) 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 (m *RemoveBlacklistReq) String() string { return proto.CompactTextString(m) }
func (*RemoveBlacklistReq) ProtoMessage() {} func (*RemoveBlacklistReq) ProtoMessage() {}
func (*RemoveBlacklistReq) Descriptor() ([]byte, []int) { 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 { func (m *RemoveBlacklistReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RemoveBlacklistReq.Unmarshal(m, b) 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 (m *RemoveBlacklistResp) String() string { return proto.CompactTextString(m) }
func (*RemoveBlacklistResp) ProtoMessage() {} func (*RemoveBlacklistResp) ProtoMessage() {}
func (*RemoveBlacklistResp) Descriptor() ([]byte, []int) { 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 { func (m *RemoveBlacklistResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RemoveBlacklistResp.Unmarshal(m, b) 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 (m *GetBlacklistReq) String() string { return proto.CompactTextString(m) }
func (*GetBlacklistReq) ProtoMessage() {} func (*GetBlacklistReq) ProtoMessage() {}
func (*GetBlacklistReq) Descriptor() ([]byte, []int) { 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 { func (m *GetBlacklistReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBlacklistReq.Unmarshal(m, b) 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 (m *GetBlacklistResp) String() string { return proto.CompactTextString(m) }
func (*GetBlacklistResp) ProtoMessage() {} func (*GetBlacklistResp) ProtoMessage() {}
func (*GetBlacklistResp) Descriptor() ([]byte, []int) { 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 { func (m *GetBlacklistResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBlacklistResp.Unmarshal(m, b) 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 (m *IsFriendReq) String() string { return proto.CompactTextString(m) }
func (*IsFriendReq) ProtoMessage() {} func (*IsFriendReq) ProtoMessage() {}
func (*IsFriendReq) Descriptor() ([]byte, []int) { 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 { func (m *IsFriendReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IsFriendReq.Unmarshal(m, b) 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 (m *IsFriendResp) String() string { return proto.CompactTextString(m) }
func (*IsFriendResp) ProtoMessage() {} func (*IsFriendResp) ProtoMessage() {}
func (*IsFriendResp) Descriptor() ([]byte, []int) { 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 { func (m *IsFriendResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IsFriendResp.Unmarshal(m, b) 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 (m *IsInBlackListReq) String() string { return proto.CompactTextString(m) }
func (*IsInBlackListReq) ProtoMessage() {} func (*IsInBlackListReq) ProtoMessage() {}
func (*IsInBlackListReq) Descriptor() ([]byte, []int) { 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 { func (m *IsInBlackListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IsInBlackListReq.Unmarshal(m, b) 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 (m *IsInBlackListResp) String() string { return proto.CompactTextString(m) }
func (*IsInBlackListResp) ProtoMessage() {} func (*IsInBlackListResp) ProtoMessage() {}
func (*IsInBlackListResp) Descriptor() ([]byte, []int) { 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 { func (m *IsInBlackListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_IsInBlackListResp.Unmarshal(m, b) 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 (m *DeleteFriendReq) String() string { return proto.CompactTextString(m) }
func (*DeleteFriendReq) ProtoMessage() {} func (*DeleteFriendReq) ProtoMessage() {}
func (*DeleteFriendReq) Descriptor() ([]byte, []int) { 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 { func (m *DeleteFriendReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteFriendReq.Unmarshal(m, b) 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 (m *DeleteFriendResp) String() string { return proto.CompactTextString(m) }
func (*DeleteFriendResp) ProtoMessage() {} func (*DeleteFriendResp) ProtoMessage() {}
func (*DeleteFriendResp) Descriptor() ([]byte, []int) { 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 { func (m *DeleteFriendResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteFriendResp.Unmarshal(m, b) return xxx_messageInfo_DeleteFriendResp.Unmarshal(m, b)
@ -1153,7 +1153,7 @@ func (m *DeleteFriendResp) GetCommonResp() *CommonResp {
// process // process
type AddFriendResponseReq struct { type AddFriendResponseReq struct {
CommID *CommID `protobuf:"bytes,1,opt,name=CommID" json:"CommID,omitempty"` 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"` HandleMsg string `protobuf:"bytes,3,opt,name=handleMsg" json:"handleMsg,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `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 (m *AddFriendResponseReq) String() string { return proto.CompactTextString(m) }
func (*AddFriendResponseReq) ProtoMessage() {} func (*AddFriendResponseReq) ProtoMessage() {}
func (*AddFriendResponseReq) Descriptor() ([]byte, []int) { 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 { func (m *AddFriendResponseReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddFriendResponseReq.Unmarshal(m, b) return xxx_messageInfo_AddFriendResponseReq.Unmarshal(m, b)
@ -1191,9 +1191,9 @@ func (m *AddFriendResponseReq) GetCommID() *CommID {
return nil return nil
} }
func (m *AddFriendResponseReq) GetFlag() int32 { func (m *AddFriendResponseReq) GetHandleResult() int32 {
if m != nil { if m != nil {
return m.Flag return m.HandleResult
} }
return 0 return 0
} }
@ -1216,7 +1216,7 @@ func (m *AddFriendResponseResp) Reset() { *m = AddFriendResponseResp{} }
func (m *AddFriendResponseResp) String() string { return proto.CompactTextString(m) } func (m *AddFriendResponseResp) String() string { return proto.CompactTextString(m) }
func (*AddFriendResponseResp) ProtoMessage() {} func (*AddFriendResponseResp) ProtoMessage() {}
func (*AddFriendResponseResp) Descriptor() ([]byte, []int) { 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 { func (m *AddFriendResponseResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AddFriendResponseResp.Unmarshal(m, b) 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 (m *SetFriendRemarkReq) String() string { return proto.CompactTextString(m) }
func (*SetFriendRemarkReq) ProtoMessage() {} func (*SetFriendRemarkReq) ProtoMessage() {}
func (*SetFriendRemarkReq) Descriptor() ([]byte, []int) { 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 { func (m *SetFriendRemarkReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetFriendRemarkReq.Unmarshal(m, b) 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 (m *SetFriendRemarkResp) String() string { return proto.CompactTextString(m) }
func (*SetFriendRemarkResp) ProtoMessage() {} func (*SetFriendRemarkResp) ProtoMessage() {}
func (*SetFriendRemarkResp) Descriptor() ([]byte, []int) { 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 { func (m *SetFriendRemarkResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SetFriendRemarkResp.Unmarshal(m, b) 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 (m *GetSelfApplyListReq) String() string { return proto.CompactTextString(m) }
func (*GetSelfApplyListReq) ProtoMessage() {} func (*GetSelfApplyListReq) ProtoMessage() {}
func (*GetSelfApplyListReq) Descriptor() ([]byte, []int) { 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 { func (m *GetSelfApplyListReq) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSelfApplyListReq.Unmarshal(m, b) 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 (m *GetSelfApplyListResp) String() string { return proto.CompactTextString(m) }
func (*GetSelfApplyListResp) ProtoMessage() {} func (*GetSelfApplyListResp) ProtoMessage() {}
func (*GetSelfApplyListResp) Descriptor() ([]byte, []int) { 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 { func (m *GetSelfApplyListResp) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSelfApplyListResp.Unmarshal(m, b) return xxx_messageInfo_GetSelfApplyListResp.Unmarshal(m, b)
@ -1923,68 +1923,68 @@ var _Friend_serviceDesc = grpc.ServiceDesc{
Metadata: "friend/friend.proto", Metadata: "friend/friend.proto",
} }
func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_33f7e79cb4454131) } func init() { proto.RegisterFile("friend/friend.proto", fileDescriptor_friend_74b4824fb8c5de90) }
var fileDescriptor_friend_33f7e79cb4454131 = []byte{ var fileDescriptor_friend_74b4824fb8c5de90 = []byte{
// 949 bytes of a gzipped FileDescriptorProto // 950 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcd, 0x8f, 0xdb, 0x44, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcf, 0x8f, 0xdb, 0x44,
0x14, 0x97, 0x9b, 0xdd, 0x34, 0x79, 0x49, 0x9b, 0x64, 0x92, 0x2d, 0xc1, 0xdd, 0xad, 0x52, 0x1f, 0x14, 0x96, 0x9b, 0x6e, 0x9a, 0xbc, 0xa4, 0x4d, 0x32, 0xc9, 0x96, 0xe0, 0xee, 0x56, 0xa9, 0x0f,
0x50, 0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, 0x08, 0x7d, 0x97, 0xa3, 0x63, 0x19, 0x3d, 0x06, 0x58, 0x78, 0xee, 0x36,
0xa5, 0x12, 0x47, 0x7b, 0x0c, 0x9d, 0x4b, 0xe2, 0x2f, 0x78, 0xd0, 0x4c, 0x77, 0xd6, 0x2e, 0x26, 0xb2, 0x1e, 0x84, 0x56, 0x41, 0xa3, 0x3d, 0x83, 0xce, 0x19, 0xf1, 0x17, 0x61, 0xd2, 0x4c, 0x77,
0xaf, 0xd1, 0x27, 0x91, 0x63, 0xdc, 0x99, 0xc6, 0xe4, 0xee, 0x28, 0xcc, 0x91, 0xe0, 0xe2, 0x50, 0x2e, 0x5d, 0x4c, 0xde, 0xa1, 0x8f, 0xe2, 0xc0, 0xc2, 0x60, 0x1a, 0x93, 0x07, 0xa3, 0xa8, 0x46,
0xaa, 0xfd, 0xae, 0x48, 0x68, 0x01, 0x16, 0x99, 0x98, 0x27, 0x33, 0x31, 0x8f, 0x33, 0x31, 0x4f, 0x5c, 0x8b, 0x23, 0xab, 0xf6, 0x9b, 0x22, 0xa0, 0x39, 0x98, 0x57, 0x62, 0x2e, 0x57, 0x62, 0x9e,
0x64, 0x42, 0x50, 0x68, 0x0e, 0x77, 0x63, 0x1b, 0xdf, 0x5b, 0xcc, 0xef, 0x57, 0x06, 0x95, 0x61, 0x54, 0x62, 0x2e, 0x55, 0x82, 0x4b, 0x68, 0x0e, 0x0f, 0x12, 0x1f, 0xdf, 0x5a, 0xcc, 0xef, 0x57,
0x63, 0x72, 0x36, 0x62, 0xc4, 0x7b, 0x43, 0xbc, 0x95, 0x41, 0xad, 0x15, 0x35, 0x3c, 0x63, 0xc7, 0x06, 0x95, 0x61, 0x63, 0x72, 0x3c, 0x62, 0xc4, 0x7b, 0x4f, 0xbc, 0x95, 0x41, 0xad, 0x15, 0x35,
0x46, 0xd2, 0xc7, 0x52, 0x20, 0xed, 0x19, 0x34, 0xa7, 0xa6, 0x29, 0x98, 0x05, 0xc2, 0x08, 0xdc, 0x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, 0x26, 0x32, 0xe3, 0xf2, 0x39, 0x74, 0x8c, 0xf4, 0x20, 0x42, 0xa7, 0x21, 0x26, 0x2e, 0x52, 0x1b, 0x36, 0x71, 0x91, 0xd9, 0x9f, 0xaf, 0xa0, 0x63, 0xa4, 0x17, 0x11,
0xb9, 0x7d, 0x1a, 0x4e, 0x45, 0xf5, 0xec, 0x1d, 0x52, 0x51, 0x20, 0x96, 0x9c, 0x1b, 0x71, 0x81, 0x3a, 0xca, 0x9d, 0xd3, 0x68, 0x4b, 0xaa, 0xc7, 0x37, 0x58, 0x79, 0x83, 0x98, 0xbc, 0x37, 0x92,
0xb2, 0x63, 0x2a, 0x2e, 0x50, 0xde, 0xb0, 0x99, 0x42, 0xd3, 0x92, 0x6e, 0xd8, 0x71, 0x80, 0xa9, 0x06, 0x65, 0xd7, 0x54, 0xd2, 0xa0, 0xbc, 0x65, 0x33, 0x85, 0xa6, 0x25, 0x3c, 0xb9, 0x93, 0x04,
0xbf, 0x8a, 0x38, 0xc0, 0xf4, 0x85, 0xfc, 0x69, 0xe7, 0xc7, 0xd6, 0x28, 0xfc, 0xcd, 0x7d, 0x2c, 0x53, 0x9f, 0x19, 0x49, 0x82, 0xe9, 0x17, 0xfa, 0x8b, 0xce, 0xf7, 0xad, 0x51, 0xf4, 0xdd, 0xfb,
0x1e, 0x2f, 0xab, 0xfc, 0x1f, 0xf6, 0xb3, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x20, 0x88, 0xcd, 0x8c, 0xff, 0x79, 0x53, 0x0d, 0x3f, 0x6a, 0x3f, 0xf9, 0x27, 0x00, 0x00, 0xff, 0xff, 0x26, 0xd5,
0xd3, 0x05, 0x0f, 0x00, 0x00, 0xdf, 0x90, 0x16, 0x0f, 0x00, 0x00,
} }

View File

@ -127,7 +127,7 @@ message DeleteFriendResp{
//process //process
message AddFriendResponseReq{ message AddFriendResponseReq{
CommID CommID = 1; CommID CommID = 1;
int32 flag = 2; int32 handleResult = 2;
string handleMsg = 3; string handleMsg = 3;
} }
message AddFriendResponseResp{ message AddFriendResponseResp{

View File

@ -223,27 +223,63 @@ message TipsComm{
} }
//////////////////////group///////////////////// //////////////////////group/////////////////////
//Actively join the group
message MemberEnterTips{
GroupInfo group = 1;
GroupMemberFullInfo entrantUser = 2;
int64 operationTime = 3;
}
//Actively leave the group
message MemberLeaveTips{
GroupInfo group = 1;
GroupMemberFullInfo leaverUser = 2;
int64 operationTime = 3;
}
message MemberInvitedTips{ // OnGroupCreated()
message GroupCreatedTips{
GroupInfo group = 1; GroupInfo group = 1;
GroupMemberFullInfo opUser = 2; GroupMemberFullInfo creator = 2;
repeated GroupMemberFullInfo invitedUserList = 3; repeated GroupMemberFullInfo memberList = 3;
int64 operationTime = 4; 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 MemberQuitTips{
GroupInfo group = 1;
GroupMemberFullInfo quitUser = 2;
int64 operationTime = 3;
}
// OnApplicationGroupAccepted()
message GroupApplicationAcceptedTips{
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
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{ message MemberKickedTips{
GroupInfo group = 1; GroupInfo group = 1;
GroupMemberFullInfo opUser = 2; GroupMemberFullInfo opUser = 2;
@ -251,21 +287,28 @@ message MemberKickedTips{
int64 operationTime = 4; int64 operationTime = 4;
} }
message MemberInfoChangedTips{ // OnMemberInvited()
int32 changeType = 1; ///bitwise operators 0001:member info changed; 0010:mute ; message MemberInvitedTips{
GroupMemberFullInfo opUser = 2; //who do this
GroupMemberFullInfo finalInfo = 3; //
int64 muteTime = 4;
GroupInfo group = 5;
}
message GroupCreatedTips{
GroupInfo group = 1; GroupInfo group = 1;
GroupMemberFullInfo creator = 2; GroupMemberFullInfo opUser = 2;
repeated GroupMemberFullInfo memberList = 3; repeated GroupMemberFullInfo invitedUserList = 3;
int64 operationTime = 4; int64 operationTime = 4;
} }
//Actively join the group
//message MemberEnterTips{
// GroupInfo group = 1;
// GroupMemberFullInfo entrantUser = 2;
// int64 operationTime = 3;
//}
message GroupInfoChangedTips{ message GroupInfoChangedTips{
int32 changedType = 1; //bitwise operators: 0001:groupName; 0010:Notification 0100:Introduction; 1000:FaceUrl int32 changedType = 1; //bitwise operators: 0001:groupName; 0010:Notification 0100:Introduction; 1000:FaceUrl
GroupInfo group = 2; GroupInfo group = 2;
@ -278,12 +321,10 @@ message JoinGroupApplicationTips{
string reason = 3; string reason = 3;
} }
message ApplicationProcessedTips{
GroupInfo group = 1;
GroupMemberFullInfo opUser = 2;
int32 result = 3;
string reason = 4;
}
//////////////////////friend///////////////////// //////////////////////friend/////////////////////
//message FriendInfo{ //message FriendInfo{