mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Improve error message when joining a group with already pending admin approval
This commit is contained in:
parent
a708025a16
commit
489fb2ac22
6 changed files with 27 additions and 3 deletions
|
@ -9,6 +9,7 @@ import org.asamk.signal.commands.exceptions.UnexpectedErrorException;
|
|||
import org.asamk.signal.commands.exceptions.UserErrorException;
|
||||
import org.asamk.signal.manager.Manager;
|
||||
import org.asamk.signal.manager.api.InactiveGroupLinkException;
|
||||
import org.asamk.signal.manager.api.PendingAdminApprovalException;
|
||||
import org.asamk.signal.manager.groups.GroupInviteLinkUrl;
|
||||
import org.asamk.signal.output.JsonWriter;
|
||||
import org.asamk.signal.output.OutputWriter;
|
||||
|
@ -94,6 +95,8 @@ public class JoinGroupCommand implements JsonRpcLocalCommand {
|
|||
.getSimpleName() + ")", e);
|
||||
} catch (InactiveGroupLinkException e) {
|
||||
throw new UserErrorException("Group link is not valid: " + e.getMessage());
|
||||
} catch (PendingAdminApprovalException e) {
|
||||
throw new UserErrorException("Pending admin approval: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue