mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 19:10:38 +00:00
Add UnregisteredRecipientException
This commit is contained in:
parent
a7ecb9e10f
commit
c88c92086e
20 changed files with 244 additions and 117 deletions
|
@ -8,6 +8,7 @@ import org.asamk.signal.commands.exceptions.CommandException;
|
|||
import org.asamk.signal.commands.exceptions.IOErrorException;
|
||||
import org.asamk.signal.commands.exceptions.UserErrorException;
|
||||
import org.asamk.signal.manager.Manager;
|
||||
import org.asamk.signal.manager.api.UnregisteredRecipientException;
|
||||
import org.asamk.signal.manager.groups.GroupNotFoundException;
|
||||
import org.asamk.signal.manager.groups.LastGroupAdminException;
|
||||
import org.asamk.signal.manager.groups.NotAGroupMemberException;
|
||||
|
@ -70,6 +71,8 @@ public class QuitGroupCommand implements JsonRpcLocalCommand {
|
|||
throw new UserErrorException("Failed to send to group: " + e.getMessage());
|
||||
} catch (LastGroupAdminException e) {
|
||||
throw new UserErrorException("You need to specify a new admin with --admin: " + e.getMessage());
|
||||
} catch (UnregisteredRecipientException e) {
|
||||
throw new UserErrorException("The user " + e.getSender().getIdentifier() + " is not registered.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue