mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
super group remove unread message
This commit is contained in:
parent
465dbf09cd
commit
f42b9a6dfe
@ -454,6 +454,27 @@ func (s *groupServer) KickGroupMember(ctx context.Context, req *pbGroup.KickGrou
|
||||
} else {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "SetConversation success", respPb.String(), v)
|
||||
}
|
||||
reqPb := pbConversation.ModifyConversationFieldReq{Conversation: &pbConversation.Conversation{}}
|
||||
reqPb.OperationID = req.OperationID
|
||||
reqPb.UserIDList = okUserIDList
|
||||
reqPb.FieldType = constant.FieldUnread
|
||||
reqPb.Conversation.GroupID = req.GroupID
|
||||
reqPb.Conversation.ConversationID = utils.GetConversationIDBySessionType(req.GroupID, constant.SuperGroupChatType)
|
||||
reqPb.Conversation.ConversationType = int32(constant.SuperGroupChatType)
|
||||
reqPb.Conversation.UpdateUnreadCountTime = utils.GetCurrentTimestampByMill()
|
||||
etcdConn := getcdv3.GetDefaultConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImConversationName, req.OperationID)
|
||||
if etcdConn == nil {
|
||||
errMsg := req.OperationID + "getcdv3.GetDefaultConn == nil"
|
||||
log.NewError(req.OperationID, errMsg)
|
||||
}
|
||||
client := pbConversation.NewConversationClient(etcdConn)
|
||||
respPb, err := client.ModifyConversationField(context.Background(), &reqPb)
|
||||
if err != nil {
|
||||
log.NewError(req.OperationID, utils.GetSelfFuncName(), "ModifyConversationField rpc failed, ", reqPb.String(), err.Error())
|
||||
} else {
|
||||
log.NewDebug(req.OperationID, utils.GetSelfFuncName(), "ModifyConversationField success", respPb.String())
|
||||
}
|
||||
|
||||
}
|
||||
chat.MemberKickedNotification(req, okUserIDList)
|
||||
log.NewInfo(req.OperationID, "GetGroupMemberList rpc return ", resp.String())
|
||||
|
Loading…
x
Reference in New Issue
Block a user