mirror of
https://github.com/aljazceru/signal-cli.git
synced 2026-01-02 22:04:18 +01:00
Refactor message sending
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user