use of org.thoughtcrime.securesms.jobs.MultiDeviceContactSyncJob in project Signal-Android by WhisperSystems.
the class MessageContentProcessor method handleSynchronizeContacts.
private void handleSynchronizeContacts(@NonNull ContactsMessage contactsMessage, long envelopeTimestamp) throws IOException {
if (SignalStore.account().isLinkedDevice()) {
log(envelopeTimestamp, "Synchronize contacts.");
} else {
log(envelopeTimestamp, "Primary device ignores synchronize contacts.");
return;
}
if (!(contactsMessage.getContactsStream() instanceof SignalServiceAttachmentPointer)) {
warn(envelopeTimestamp, "No contact stream available.");
return;
}
SignalServiceAttachmentPointer contactsAttachment = (SignalServiceAttachmentPointer) contactsMessage.getContactsStream();
ApplicationDependencies.getJobManager().add(new MultiDeviceContactSyncJob(contactsAttachment));
}
Aggregations