X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/03589f858ba2cf52df4d85a9d68df3f3cda5cb74..ea633efc9c113918c84994f75ed72116f708dada:/src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java diff --git a/src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java b/src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java index 834f0d23..3e06d613 100644 --- a/src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java +++ b/src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java @@ -8,6 +8,7 @@ import org.asamk.signal.manager.NotMasterDeviceException; import org.asamk.signal.manager.groups.GroupId; import org.asamk.signal.manager.groups.GroupInviteLinkUrl; import org.asamk.signal.manager.groups.GroupNotFoundException; +import org.asamk.signal.manager.groups.LastGroupAdminException; import org.asamk.signal.manager.groups.NotAGroupMemberException; import org.asamk.signal.manager.storage.identities.IdentityInfo; import org.asamk.signal.util.ErrorUtils; @@ -24,6 +25,7 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -349,7 +351,10 @@ public class DbusSignalImpl implements Signal { null, false, null, - avatar == null ? null : new File(avatar)); + null, + null, + avatar == null ? null : new File(avatar), + null); checkSendMessageResults(results.first(), results.second()); return groupId; } @@ -439,11 +444,13 @@ public class DbusSignalImpl implements Signal { public void quitGroup(final byte[] groupId) { var group = GroupId.unknownVersion(groupId); try { - m.sendQuitGroupMessage(group); + m.sendQuitGroupMessage(group, Set.of()); } catch (GroupNotFoundException | NotAGroupMemberException e) { throw new Error.GroupNotFound(e.getMessage()); - } catch (IOException e) { + } catch (IOException | LastGroupAdminException e) { throw new Error.Failure(e.getMessage()); + } catch (InvalidNumberException e) { + throw new Error.InvalidNumber(e.getMessage()); } }