X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/312c6c8bb2ace8d5e6ac35572834ece839682691..36475bb632316d0333f1c44f6639c4f63007bdce:/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 ae19c978..879e6028 100644 --- a/src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java +++ b/src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java @@ -4,6 +4,7 @@ import org.asamk.Signal; import org.asamk.signal.BaseConfig; import org.asamk.signal.manager.AttachmentInvalidException; import org.asamk.signal.manager.Manager; +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; @@ -260,6 +261,8 @@ public class DbusSignalImpl implements Signal { m.setContactName(number, name); } catch (InvalidNumberException e) { throw new Error.InvalidNumber(e.getMessage()); + } catch (NotMasterDeviceException e) { + throw new Error.Failure("This command doesn't work on linked devices."); } } @@ -269,6 +272,8 @@ public class DbusSignalImpl implements Signal { m.setContactBlocked(number, blocked); } catch (InvalidNumberException e) { throw new Error.InvalidNumber(e.getMessage()); + } catch (NotMasterDeviceException e) { + throw new Error.Failure("This command doesn't work on linked devices."); } }