mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Prevent error when including self in member list
This commit is contained in:
parent
da29cdfe10
commit
4fd3657f3d
1 changed files with 5 additions and 4 deletions
|
@ -772,10 +772,11 @@ public class Manager implements Closeable {
|
|||
public Pair<GroupId, List<SendMessageResult>> updateGroup(
|
||||
GroupId groupId, String name, List<String> members, File avatarFile
|
||||
) throws IOException, GroupNotFoundException, AttachmentInvalidException, InvalidNumberException, NotAGroupMemberException {
|
||||
return sendUpdateGroupMessage(groupId,
|
||||
name,
|
||||
members == null ? null : getSignalServiceAddresses(members),
|
||||
avatarFile);
|
||||
final var membersRecipientIds = members == null ? null : getSignalServiceAddresses(members);
|
||||
if (membersRecipientIds != null) {
|
||||
membersRecipientIds.remove(account.getSelfRecipientId());
|
||||
}
|
||||
return sendUpdateGroupMessage(groupId, name, membersRecipientIds, avatarFile);
|
||||
}
|
||||
|
||||
private Pair<GroupId, List<SendMessageResult>> sendUpdateGroupMessage(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue