mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
super group add notification
This commit is contained in:
parent
88c4cff50c
commit
7d0c8b0c5f
@ -200,9 +200,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR
|
||||
if req.GroupInfo.GroupType != constant.SuperGroup {
|
||||
chat.GroupCreatedNotification(req.OperationID, req.OpUserID, groupId, okUserIDList)
|
||||
} else {
|
||||
for _, userID := range okUserIDList {
|
||||
chat.SuperGroupNotification(req.OperationID, req.OpUserID, userID)
|
||||
}
|
||||
chat.SuperGroupNotification(req.OperationID, req.OpUserID, groupId)
|
||||
|
||||
}
|
||||
return resp, nil
|
||||
@ -385,9 +383,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
|
||||
if groupInfo.GroupType != constant.SuperGroup {
|
||||
chat.MemberInvitedNotification(req.OperationID, req.GroupID, req.OpUserID, req.Reason, okUserIDList)
|
||||
} else {
|
||||
for _, userID := range okUserIDList {
|
||||
chat.SuperGroupNotification(req.OperationID, req.OpUserID, userID)
|
||||
}
|
||||
chat.SuperGroupNotification(req.OperationID, req.OpUserID, req.GroupID)
|
||||
}
|
||||
|
||||
log.NewInfo(req.OperationID, "InviteUserToGroup rpc return ")
|
||||
@ -589,9 +585,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou
|
||||
if groupInfo.GroupType != constant.SuperGroup {
|
||||
chat.MemberKickedNotification(req, okUserIDList)
|
||||
} else {
|
||||
for _, userID := range okUserIDList {
|
||||
chat.SuperGroupNotification(req.OperationID, req.OpUserID, userID)
|
||||
}
|
||||
chat.SuperGroupNotification(req.OperationID, req.OpUserID, req.GroupID)
|
||||
}
|
||||
log.NewInfo(req.OperationID, "GetGroupMemberList rpc return ", resp.String())
|
||||
return &resp, nil
|
||||
|
@ -511,7 +511,7 @@ func Notification(n *NotificationMsg) {
|
||||
msg.ClientMsgID = utils.GetMsgID(n.SendID)
|
||||
msg.Options = make(map[string]bool, 7)
|
||||
switch n.SessionType {
|
||||
case constant.GroupChatType:
|
||||
case constant.GroupChatType, constant.SuperGroupChatType:
|
||||
msg.RecvID = ""
|
||||
msg.GroupID = n.RecvID
|
||||
}
|
||||
@ -732,6 +732,8 @@ func Notification(n *NotificationMsg) {
|
||||
unReadCount = config.Config.Notification.ConversationSetPrivate.Conversation.UnreadCount
|
||||
case constant.DeleteMessageNotification:
|
||||
reliabilityLevel = constant.ReliableNotificationNoMsg
|
||||
case constant.SuperGroupUpdateNotification:
|
||||
reliabilityLevel = constant.UnreliableNotification
|
||||
}
|
||||
switch reliabilityLevel {
|
||||
case constant.UnreliableNotification:
|
||||
|
@ -9,7 +9,8 @@ import (
|
||||
//"github.com/golang/protobuf/proto"
|
||||
)
|
||||
|
||||
func SuperGroupNotification(operationID, sendID, recvID string) {
|
||||
func SuperGroupNotification(operationID, sendID, groupID string) {
|
||||
|
||||
//var tips sdk.TipsComm
|
||||
//var err error
|
||||
//marshaler := jsonpb.Marshaler{
|
||||
@ -20,10 +21,10 @@ func SuperGroupNotification(operationID, sendID, recvID string) {
|
||||
//tips.JsonDetail, _ = marshaler.MarshalToString(m)
|
||||
n := &NotificationMsg{
|
||||
SendID: sendID,
|
||||
RecvID: recvID,
|
||||
MsgFrom: constant.UserMsgType,
|
||||
RecvID: groupID,
|
||||
MsgFrom: constant.SysMsgType,
|
||||
ContentType: constant.SuperGroupUpdateNotification,
|
||||
SessionType: constant.SingleChatType,
|
||||
SessionType: constant.SuperGroupChatType,
|
||||
OperationID: operationID,
|
||||
}
|
||||
//n.Content, err = proto.Marshal(&tips)
|
||||
|
Loading…
x
Reference in New Issue
Block a user