diff --git a/pkg/rpcclient/notification/group.go b/pkg/rpcclient/notification/group.go index 81dfffa0b..6e3919e46 100644 --- a/pkg/rpcclient/notification/group.go +++ b/pkg/rpcclient/notification/group.go @@ -638,11 +638,16 @@ func (g *GroupNotificationSender) GroupCancelMutedNotification(ctx context.Conte if err != nil { return err } - user, err := g.getGroupMember(ctx, groupID, mcontext.GetOpUserID(ctx)) + users, err := g.getGroupMembers(ctx, groupID, []string{mcontext.GetOpUserID(ctx)}) if err != nil { return err } - tips := &sdkws.GroupCancelMutedTips{Group: group, OpUser: user} + tips := &sdkws.GroupCancelMutedTips{Group: group} + if len(users) > 0 { + tips.OpUser = users[0] + } else { + tips.OpUser = &sdkws.GroupMemberFullInfo{UserID: mcontext.GetOpUserID(ctx), GroupID: groupID} + } return g.msgClient.Notification(ctx, mcontext.GetOpUserID(ctx), group.GroupID, constant.GroupMutedNotification, tips) }