Prevent error when including self in member list

This commit is contained in:
AsamK 2021-05-13 11:56:03 +02:00
parent da29cdfe10
commit 4fd3657f3d

View file

@ -772,10 +772,11 @@ public class Manager implements Closeable {
public Pair<GroupId, List<SendMessageResult>> updateGroup( public Pair<GroupId, List<SendMessageResult>> updateGroup(
GroupId groupId, String name, List<String> members, File avatarFile GroupId groupId, String name, List<String> members, File avatarFile
) throws IOException, GroupNotFoundException, AttachmentInvalidException, InvalidNumberException, NotAGroupMemberException { ) throws IOException, GroupNotFoundException, AttachmentInvalidException, InvalidNumberException, NotAGroupMemberException {
return sendUpdateGroupMessage(groupId, final var membersRecipientIds = members == null ? null : getSignalServiceAddresses(members);
name, if (membersRecipientIds != null) {
members == null ? null : getSignalServiceAddresses(members), membersRecipientIds.remove(account.getSelfRecipientId());
avatarFile); }
return sendUpdateGroupMessage(groupId, name, membersRecipientIds, avatarFile);
} }
private Pair<GroupId, List<SendMessageResult>> sendUpdateGroupMessage( private Pair<GroupId, List<SendMessageResult>> sendUpdateGroupMessage(