X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/3e2024ff0a581c730c2ddd4b80e50cb12d721730..bc17f9317e09c97907123da06a44b42b67f16b0d:/src/main/java/org/asamk/signal/Manager.java diff --git a/src/main/java/org/asamk/signal/Manager.java b/src/main/java/org/asamk/signal/Manager.java index 29e75ee9..90785824 100644 --- a/src/main/java/org/asamk/signal/Manager.java +++ b/src/main/java/org/asamk/signal/Manager.java @@ -478,9 +478,11 @@ class Manager implements Signal { if (g == null) { throw new GroupNotFoundException(groupId); } - Set members = g.members; - members.remove(this.username); - sendMessage(message, members); + + // Don't send group message to ourself + final List membersSend = new ArrayList<>(g.members); + membersSend.remove(this.username); + sendMessage(message, membersSend); } public void sendQuitGroupMessage(byte[] groupId) throws GroupNotFoundException, IOException, EncapsulatedExceptions, UntrustedIdentityException { @@ -555,7 +557,8 @@ class Manager implements Signal { .asGroupMessage(group.build()) .build(); - final Set membersSend = g.members; + // Don't send group message to ourself + final List membersSend = new ArrayList<>(g.members); membersSend.remove(this.username); sendMessage(message, membersSend); return g.groupId;