kick group member add kicked notification

This commit is contained in:
Gordon
2023-02-01 17:33:56 +08:00
parent 2dab70697c
commit a60b584dca
3 changed files with 20 additions and 5 deletions
+11
View File
@@ -19,6 +19,7 @@ import (
pbRtc "Open_IM/pkg/proto/rtc"
"Open_IM/pkg/utils"
"context"
"encoding/json"
"strings"
promePkg "Open_IM/pkg/common/prometheus"
@@ -179,6 +180,16 @@ func MsgToSuperGroupUser(pushMsg *pbPush.PushMsgReq) {
}
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)