mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
DismissGroup
This commit is contained in:
parent
b87fd91dd7
commit
e0c70742a8
@ -555,11 +555,19 @@ func (g *GroupNotificationSender) GroupDismissedNotification(ctx context.Context
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
user, err := g.getGroupMember(ctx, req.GroupID, mcontext.GetOpUserID(ctx))
|
users, err := g.getGroupMembers(ctx, req.GroupID, []string{mcontext.GetOpUserID(ctx)})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
tips := &sdkws.GroupDismissedTips{Group: group, OpUser: user}
|
tips := &sdkws.GroupDismissedTips{Group: group}
|
||||||
|
if len(users) > 0 {
|
||||||
|
tips.OpUser = users[0]
|
||||||
|
} else {
|
||||||
|
tips.OpUser = &sdkws.GroupMemberFullInfo{
|
||||||
|
GroupID: group.GroupID,
|
||||||
|
UserID: mcontext.GetOpUserID(ctx),
|
||||||
|
}
|
||||||
|
}
|
||||||
return g.msgClient.Notification(ctx, mcontext.GetOpUserID(ctx), group.GroupID, constant.GroupDismissedNotification, tips)
|
return g.msgClient.Notification(ctx, mcontext.GetOpUserID(ctx), group.GroupID, constant.GroupDismissedNotification, tips)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user