mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Inline unnecessary methods
This commit is contained in:
parent
208e12bdc6
commit
a69e8facd2
1 changed files with 4 additions and 12 deletions
|
@ -293,7 +293,7 @@ class Manager implements TextSecure {
|
||||||
}
|
}
|
||||||
TextSecureDataMessage message = messageBuilder.build();
|
TextSecureDataMessage message = messageBuilder.build();
|
||||||
|
|
||||||
sendMessage(message, getGroupInfo(groupId).members);
|
sendMessage(message, groupStore.getGroup(groupId).members);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendQuitGroupMessage(byte[] groupId) throws GroupNotFoundException, IOException, EncapsulatedExceptions {
|
public void sendQuitGroupMessage(byte[] groupId) throws GroupNotFoundException, IOException, EncapsulatedExceptions {
|
||||||
|
@ -305,7 +305,7 @@ class Manager implements TextSecure {
|
||||||
.asGroupMessage(group)
|
.asGroupMessage(group)
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
sendMessage(message, getGroupInfo(groupId).members);
|
sendMessage(message, groupStore.getGroup(groupId).members);
|
||||||
}
|
}
|
||||||
|
|
||||||
public byte[] sendUpdateGroupMessage(byte[] groupId, String name, Collection<String> members, String avatarFile) throws IOException, EncapsulatedExceptions, GroupNotFoundException, AttachmentInvalidException {
|
public byte[] sendUpdateGroupMessage(byte[] groupId, String name, Collection<String> members, String avatarFile) throws IOException, EncapsulatedExceptions, GroupNotFoundException, AttachmentInvalidException {
|
||||||
|
@ -315,7 +315,7 @@ class Manager implements TextSecure {
|
||||||
g = new GroupInfo(Util.getSecretBytes(16));
|
g = new GroupInfo(Util.getSecretBytes(16));
|
||||||
g.members.add(username);
|
g.members.add(username);
|
||||||
} else {
|
} else {
|
||||||
g = getGroupInfo(groupId);
|
g = groupStore.getGroup(groupId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (name != null) {
|
if (name != null) {
|
||||||
|
@ -349,7 +349,7 @@ class Manager implements TextSecure {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setGroupInfo(g);
|
groupStore.updateGroup(g);
|
||||||
|
|
||||||
TextSecureDataMessage message = TextSecureDataMessage.newBuilder()
|
TextSecureDataMessage message = TextSecureDataMessage.newBuilder()
|
||||||
.asGroupMessage(group.build())
|
.asGroupMessage(group.build())
|
||||||
|
@ -592,14 +592,6 @@ class Manager implements TextSecure {
|
||||||
return new TextSecureAddress(e164number);
|
return new TextSecureAddress(e164number);
|
||||||
}
|
}
|
||||||
|
|
||||||
private GroupInfo getGroupInfo(byte[] groupId) throws GroupNotFoundException {
|
|
||||||
return groupStore.getGroup(groupId);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setGroupInfo(GroupInfo group) {
|
|
||||||
groupStore.updateGroup(group);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isRemote() {
|
public boolean isRemote() {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue