mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Refactor Manager interface
This commit is contained in:
parent
b91c162159
commit
d72b838560
33 changed files with 416 additions and 169 deletions
|
@ -57,14 +57,14 @@ public class JoinGroupCommand implements JsonRpcLocalCommand {
|
|||
var newGroupId = results.first();
|
||||
if (outputWriter instanceof JsonWriter) {
|
||||
final var writer = (JsonWriter) outputWriter;
|
||||
if (!m.getGroup(newGroupId).isMember(m.getSelfRecipientId())) {
|
||||
if (!m.getGroup(newGroupId).isMember()) {
|
||||
writer.write(Map.of("groupId", newGroupId.toBase64(), "onlyRequested", true));
|
||||
} else {
|
||||
writer.write(Map.of("groupId", newGroupId.toBase64()));
|
||||
}
|
||||
} else {
|
||||
final var writer = (PlainTextWriter) outputWriter;
|
||||
if (!m.getGroup(newGroupId).isMember(m.getSelfRecipientId())) {
|
||||
if (!m.getGroup(newGroupId).isMember()) {
|
||||
writer.println("Requested to join group \"{}\"", newGroupId.toBase64());
|
||||
} else {
|
||||
writer.println("Joined group \"{}\"", newGroupId.toBase64());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue