mirror of
https://github.com/AsamK/signal-cli
synced 2025-09-01 20:10:39 +00:00
Remove extra variables in update messages
This commit is contained in:
parent
bff3beb973
commit
4fd0885a54
1 changed files with 7 additions and 10 deletions
|
@ -822,19 +822,16 @@ class Manager implements Signal {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateGroup(byte[] groupId, String name, List<String> members, String avatar) throws IOException, EncapsulatedExceptions, GroupNotFoundException, AttachmentInvalidException {
|
public void updateGroup(byte[] groupId, String name, List<String> members, String avatar) throws IOException, EncapsulatedExceptions, GroupNotFoundException, AttachmentInvalidException {
|
||||||
String optName = null;
|
if (name.isEmpty()) {
|
||||||
Collection<String> optMembers = null;
|
name = null;
|
||||||
String optAvatar = null;
|
|
||||||
if (!name.isEmpty()) {
|
|
||||||
optName = name;
|
|
||||||
}
|
}
|
||||||
if (members.size() > 0) {
|
if (members.size() == 0) {
|
||||||
optMembers = members;
|
members = null;
|
||||||
}
|
}
|
||||||
if (!avatar.isEmpty()) {
|
if (avatar.isEmpty()) {
|
||||||
optAvatar = avatar;
|
avatar = null;
|
||||||
}
|
}
|
||||||
sendUpdateGroupMessage(groupId, optName, optMembers, optAvatar);
|
sendUpdateGroupMessage(groupId, name, members, avatar);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void requestSyncGroups() throws IOException {
|
private void requestSyncGroups() throws IOException {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue