DismissGroup

test-errcode
withchao 2 years ago
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…
Cancel
Save