Exceptions: GroupNotFound, Failure, AttachmentInvalid
+sendContacts() -> <>::
+
+Sends a synchronization message with the local contacts list to all linked devices. This command should only be used if this is the primary device.
+
+Exceptions: Failure
+
+sendSyncRequest() -> <>::
+
+Sends a synchronization request to the primary device (for group, contacts, ...). Only works if sent from a secondary device.
+
+Exception: Failure
+
sendNoteToSelfMessage(message<s>, attachments<as>) -> timestamp<x>::
* message : Text to send (can be UTF8)
* attachments : String array of filenames to send as attachments (passed as filename, so need to be readable by the user signal-cli is running under)
String emoji, boolean remove, String targetAuthor, long targetSentTimestamp, List<String> recipients
) throws Error.InvalidNumber, Error.Failure;
+ void sendContacts() throws Error.Failure;
+
+ void sendSyncRequest() throws Error.Failure;
+
long sendNoteToSelfMessage(
String message, List<String> attachments
) throws Error.AttachmentInvalid, Error.Failure;
}
}
+ @Override
+ public void sendContacts() {
+ try {
+ m.sendContacts();
+ } catch (IOException e) {
+ throw new Error.Failure("SendContacts error: " + e.getMessage());
+ }
+ }
+
+ @Override
+ public void sendSyncRequest() {
+ try {
+ m.requestAllSyncData();
+ } catch (IOException e) {
+ throw new Error.Failure("Request sync data error: " + e.getMessage());
+ }
+ }
+
@Override
public long sendNoteToSelfMessage(
final String message, final List<String> attachments