mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40:39 +00:00
Refactor message sending
This commit is contained in:
parent
b77d820661
commit
893b7f7f9d
6 changed files with 404 additions and 295 deletions
|
@ -6,9 +6,7 @@ import net.sourceforge.argparse4j.inf.Subparser;
|
|||
import org.asamk.signal.OutputWriter;
|
||||
import org.asamk.signal.commands.exceptions.CommandException;
|
||||
import org.asamk.signal.commands.exceptions.IOErrorException;
|
||||
import org.asamk.signal.commands.exceptions.UntrustedKeyErrorException;
|
||||
import org.asamk.signal.manager.Manager;
|
||||
import org.whispersystems.signalservice.api.crypto.UntrustedIdentityException;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
|
@ -30,8 +28,6 @@ public class SendContactsCommand implements JsonRpcLocalCommand {
|
|||
) throws CommandException {
|
||||
try {
|
||||
m.sendContacts();
|
||||
} catch (UntrustedIdentityException e) {
|
||||
throw new UntrustedKeyErrorException("SendContacts error: " + e.getMessage());
|
||||
} catch (IOException e) {
|
||||
throw new IOErrorException("SendContacts error: " + e.getMessage());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue