mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
remove super group add kicked user notification
This commit is contained in:
parent
cc4ae8648e
commit
6ee90b60c3
@ -175,8 +175,10 @@ func main() {
|
|||||||
conversationGroup.POST("/get_all_conversations", conversation.GetAllConversations)
|
conversationGroup.POST("/get_all_conversations", conversation.GetAllConversations)
|
||||||
conversationGroup.POST("/get_conversation", conversation.GetConversation)
|
conversationGroup.POST("/get_conversation", conversation.GetConversation)
|
||||||
conversationGroup.POST("/get_conversations", conversation.GetConversations)
|
conversationGroup.POST("/get_conversations", conversation.GetConversations)
|
||||||
|
//deprecated
|
||||||
conversationGroup.POST("/set_conversation", conversation.SetConversation)
|
conversationGroup.POST("/set_conversation", conversation.SetConversation)
|
||||||
conversationGroup.POST("/batch_set_conversation", conversation.BatchSetConversations)
|
conversationGroup.POST("/batch_set_conversation", conversation.BatchSetConversations)
|
||||||
|
//deprecated
|
||||||
conversationGroup.POST("/set_recv_msg_opt", conversation.SetRecvMsgOpt)
|
conversationGroup.POST("/set_recv_msg_opt", conversation.SetRecvMsgOpt)
|
||||||
conversationGroup.POST("/modify_conversation_field", conversation.ModifyConversationField)
|
conversationGroup.POST("/modify_conversation_field", conversation.ModifyConversationField)
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@ import (
|
|||||||
pbRtc "Open_IM/pkg/proto/rtc"
|
pbRtc "Open_IM/pkg/proto/rtc"
|
||||||
"Open_IM/pkg/utils"
|
"Open_IM/pkg/utils"
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
promePkg "Open_IM/pkg/common/prometheus"
|
promePkg "Open_IM/pkg/common/prometheus"
|
||||||
@ -180,16 +179,6 @@ func MsgToSuperGroupUser(pushMsg *pbPush.PushMsgReq) {
|
|||||||
}
|
}
|
||||||
pushToUserIDList = userIDList
|
pushToUserIDList = userIDList
|
||||||
}
|
}
|
||||||
if pushMsg.MsgData.ContentType == constant.SuperGroupUpdateNotification {
|
|
||||||
m := make(map[string]bool)
|
|
||||||
_ = json.Unmarshal(pushMsg.MsgData.Content, &m)
|
|
||||||
if value, ok := m["kicked"]; ok {
|
|
||||||
if value {
|
|
||||||
pushToUserIDList = append(pushToUserIDList, pushMsg.MsgData.SendID)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
grpcCons := getcdv3.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), pushMsg.OperationID)
|
grpcCons := getcdv3.GetDefaultGatewayConn4Unique(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), pushMsg.OperationID)
|
||||||
|
|
||||||
|
@ -278,7 +278,7 @@ func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupR
|
|||||||
}
|
}
|
||||||
go func() {
|
go func() {
|
||||||
for _, v := range okUserIDList {
|
for _, v := range okUserIDList {
|
||||||
chat.SuperGroupNotification(req.OperationID, v, v, false)
|
chat.SuperGroupNotification(req.OperationID, v, v)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
@ -556,7 +556,7 @@ func (s *groupServer) InviteUserToGroup(ctx context.Context, req *pbGroup.Invite
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for _, v := range req.InvitedUserIDList {
|
for _, v := range req.InvitedUserIDList {
|
||||||
chat.SuperGroupNotification(req.OperationID, v, v, false)
|
chat.SuperGroupNotification(req.OperationID, v, v)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -788,7 +788,7 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou
|
|||||||
}
|
}
|
||||||
go func() {
|
go func() {
|
||||||
for _, v := range req.KickedUserIDList {
|
for _, v := range req.KickedUserIDList {
|
||||||
chat.SuperGroupNotification(req.OperationID, v, v, true)
|
chat.SuperGroupNotification(req.OperationID, v, v)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
@ -1224,7 +1224,7 @@ func (s *groupServer) QuitGroup(ctx context.Context, req *pbGroup.QuitGroupReq)
|
|||||||
if err := rocksCache.DelGroupMemberListHashFromCache(req.GroupID); err != nil {
|
if err := rocksCache.DelGroupMemberListHashFromCache(req.GroupID); err != nil {
|
||||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), req.GroupID, err.Error())
|
log.NewError(req.OperationID, utils.GetSelfFuncName(), req.GroupID, err.Error())
|
||||||
}
|
}
|
||||||
chat.SuperGroupNotification(req.OperationID, req.OpUserID, req.OpUserID, false)
|
chat.SuperGroupNotification(req.OperationID, req.OpUserID, req.OpUserID)
|
||||||
}
|
}
|
||||||
log.NewInfo(req.OperationID, "rpc QuitGroup return ", pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{}})
|
log.NewInfo(req.OperationID, "rpc QuitGroup return ", pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{}})
|
||||||
return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{}}, nil
|
return &pbGroup.QuitGroupResp{CommonResp: &pbGroup.CommonResp{}}, nil
|
||||||
|
@ -9,9 +9,7 @@ import (
|
|||||||
//"github.com/golang/protobuf/proto"
|
//"github.com/golang/protobuf/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
func SuperGroupNotification(operationID, sendID, recvID string, isKicked bool) {
|
func SuperGroupNotification(operationID, sendID, recvID string) {
|
||||||
m := make(map[string]bool)
|
|
||||||
m["kicked"] = isKicked
|
|
||||||
n := &NotificationMsg{
|
n := &NotificationMsg{
|
||||||
SendID: sendID,
|
SendID: sendID,
|
||||||
RecvID: recvID,
|
RecvID: recvID,
|
||||||
@ -20,7 +18,6 @@ func SuperGroupNotification(operationID, sendID, recvID string, isKicked bool) {
|
|||||||
SessionType: constant.SingleChatType,
|
SessionType: constant.SingleChatType,
|
||||||
OperationID: operationID,
|
OperationID: operationID,
|
||||||
}
|
}
|
||||||
n.Content = utils.StructToJsonBytes(m)
|
|
||||||
|
|
||||||
log.NewInfo(operationID, utils.GetSelfFuncName(), string(n.Content))
|
log.NewInfo(operationID, utils.GetSelfFuncName(), string(n.Content))
|
||||||
Notification(n)
|
Notification(n)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user