X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/8bcd8d87d219ae0496986cba4bd6b89f3b2ad6f6..6f5e72119e0c996f1efefecda11e33422d44a171:/src/main/java/org/asamk/signal/commands/JoinGroupCommand.java diff --git a/src/main/java/org/asamk/signal/commands/JoinGroupCommand.java b/src/main/java/org/asamk/signal/commands/JoinGroupCommand.java index 8c1b9fb2..1e06ea9c 100644 --- a/src/main/java/org/asamk/signal/commands/JoinGroupCommand.java +++ b/src/main/java/org/asamk/signal/commands/JoinGroupCommand.java @@ -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()); @@ -78,10 +78,10 @@ public class JoinGroupCommand implements JsonRpcLocalCommand { + e.getMessage() + " (" + e.getClass().getSimpleName() - + ")"); + + ")", e); } catch (DBusExecutionException e) { throw new UnexpectedErrorException("Failed to send message: " + e.getMessage() + " (" + e.getClass() - .getSimpleName() + ")"); + .getSimpleName() + ")", e); } catch (GroupLinkNotActiveException e) { throw new UserErrorException("Group link is not valid: " + e.getMessage()); }