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(
|
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(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue