1 package org
.asamk
.signal
.commands
;
3 import net
.sourceforge
.argparse4j
.inf
.Namespace
;
4 import net
.sourceforge
.argparse4j
.inf
.Subparser
;
6 import org
.asamk
.signal
.OutputWriter
;
7 import org
.asamk
.signal
.commands
.exceptions
.CommandException
;
8 import org
.asamk
.signal
.commands
.exceptions
.IOErrorException
;
9 import org
.asamk
.signal
.commands
.exceptions
.UntrustedKeyErrorException
;
10 import org
.asamk
.signal
.manager
.Manager
;
11 import org
.whispersystems
.signalservice
.api
.crypto
.UntrustedIdentityException
;
13 import java
.io
.IOException
;
15 public class SendContactsCommand
implements LocalCommand
{
17 public SendContactsCommand(final OutputWriter outputWriter
) {
20 public static void attachToSubparser(final Subparser subparser
) {
21 subparser
.help("Send a synchronization message with the local contacts list to all linked devices.");
25 public void handleCommand(final Namespace ns
, final Manager m
) throws CommandException
{
28 } catch (UntrustedIdentityException e
) {
29 throw new UntrustedKeyErrorException("SendContacts error: " + e
.getMessage());
30 } catch (IOException e
) {
31 throw new IOErrorException("SendContacts error: " + e
.getMessage());