Refactor message sending

This commit is contained in:
AsamK 2021-08-21 15:02:14 +02:00
parent b77d820661
commit 893b7f7f9d
6 changed files with 404 additions and 295 deletions

View file

@ -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());
}