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
|
||||
public void updateGroup(byte[] groupId, String name, List<String> members, String avatar) throws IOException, EncapsulatedExceptions, GroupNotFoundException, AttachmentInvalidException {
|
||||
String optName = null;
|
||||
Collection<String> optMembers = null;
|
||||
String optAvatar = null;
|
||||
if (!name.isEmpty()) {
|
||||
optName = name;
|
||||
if (name.isEmpty()) {
|
||||
name = null;
|
||||
}
|
||||
if (members.size() > 0) {
|
||||
optMembers = members;
|
||||
if (members.size() == 0) {
|
||||
members = null;
|
||||
}
|
||||
if (!avatar.isEmpty()) {
|
||||
optAvatar = avatar;
|
||||
if (avatar.isEmpty()) {
|
||||
avatar = null;
|
||||
}
|
||||
sendUpdateGroupMessage(groupId, optName, optMembers, optAvatar);
|
||||
sendUpdateGroupMessage(groupId, name, members, avatar);
|
||||
}
|
||||
|
||||
private void requestSyncGroups() throws IOException {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue