Add InactiveGroupLinkException

This commit is contained in:
AsamK 2021-10-31 19:45:30 +01:00
parent 3cf7721cd7
commit 659761f006
7 changed files with 32 additions and 13 deletions

View file

@ -9,6 +9,7 @@ import org.asamk.signal.manager.NotMasterDeviceException;
import org.asamk.signal.manager.StickerPackInvalidException;
import org.asamk.signal.manager.UntrustedIdentityException;
import org.asamk.signal.manager.api.Identity;
import org.asamk.signal.manager.api.InactiveGroupLinkException;
import org.asamk.signal.manager.api.InvalidDeviceLinkException;
import org.asamk.signal.manager.api.Message;
import org.asamk.signal.manager.api.Pair;
@ -31,7 +32,6 @@ import org.freedesktop.dbus.connections.impl.DBusConnection;
import org.freedesktop.dbus.exceptions.DBusException;
import org.freedesktop.dbus.exceptions.DBusExecutionException;
import org.freedesktop.dbus.types.Variant;
import org.whispersystems.signalservice.api.groupsv2.GroupLinkNotActiveException;
import org.whispersystems.signalservice.api.messages.SendMessageResult;
import org.whispersystems.signalservice.api.push.exceptions.UnregisteredUserException;
import org.whispersystems.signalservice.api.util.InvalidNumberException;
@ -670,7 +670,7 @@ public class DbusSignalImpl implements Signal {
}
final var result = m.joinGroup(linkUrl);
return result.first().serialize();
} catch (GroupInviteLinkUrl.InvalidGroupLinkException | GroupLinkNotActiveException e) {
} catch (GroupInviteLinkUrl.InvalidGroupLinkException | InactiveGroupLinkException e) {
throw new Error.Failure("Group link is invalid: " + e.getMessage());
} catch (GroupInviteLinkUrl.UnknownGroupLinkVersionException e) {
throw new Error.Failure("Group link was created with an incompatible version: " + e.getMessage());