X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/db42f61cbb763c6e20ab6dc2fd47ae412b6fe953..03f193b34ca7e2685d0166efe28ac02c0f355932:/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java diff --git a/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java b/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java index 0ccff735..3cdce248 100644 --- a/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java +++ b/src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java @@ -219,7 +219,15 @@ public class DbusManagerImpl implements Manager { throw new UnsupportedOperationException(); } final var group = getRemoteObject(signal.getGroup(groupId.serialize()), Signal.Group.class); - group.quitGroup(); + try { + group.quitGroup(); + } catch (Signal.Error.GroupNotFound e) { + throw new GroupNotFoundException(groupId); + } catch (Signal.Error.NotAGroupMember e) { + throw new NotAGroupMemberException(groupId, group.Get("org.asamk.Signal.Group", "Name")); + } catch (Signal.Error.LastGroupAdmin e) { + throw new LastGroupAdminException(groupId, group.Get("org.asamk.Signal.Group", "Name")); + } return new SendGroupMessageResults(0, List.of()); }