mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +00:00
Don’t remove self from group when sending group messages
This commit is contained in:
parent
b1f0d40d44
commit
7ce080b6db
1 changed files with 6 additions and 3 deletions
|
@ -478,9 +478,11 @@ class Manager implements Signal {
|
||||||
if (g == null) {
|
if (g == null) {
|
||||||
throw new GroupNotFoundException(groupId);
|
throw new GroupNotFoundException(groupId);
|
||||||
}
|
}
|
||||||
Set<String> members = g.members;
|
|
||||||
members.remove(this.username);
|
// Don't send group message to ourself
|
||||||
sendMessage(message, members);
|
final List<String> membersSend = new ArrayList<>(g.members);
|
||||||
|
membersSend.remove(this.username);
|
||||||
|
sendMessage(message, membersSend);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendQuitGroupMessage(byte[] groupId) throws GroupNotFoundException, IOException, EncapsulatedExceptions, UntrustedIdentityException {
|
public void sendQuitGroupMessage(byte[] groupId) throws GroupNotFoundException, IOException, EncapsulatedExceptions, UntrustedIdentityException {
|
||||||
|
@ -555,6 +557,7 @@ class Manager implements Signal {
|
||||||
.asGroupMessage(group.build())
|
.asGroupMessage(group.build())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
|
// Don't send group message to ourself
|
||||||
final List<String> membersSend = new ArrayList<>(g.members);
|
final List<String> membersSend = new ArrayList<>(g.members);
|
||||||
membersSend.remove(this.username);
|
membersSend.remove(this.username);
|
||||||
sendMessage(message, membersSend);
|
sendMessage(message, membersSend);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue