Support for multi-device group sync and group requests.

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2015-06-22 14:49:04 -07:00
parent bf3c1d3745
commit 2c9c9891c6
6 changed files with 141 additions and 6 deletions

View File

@@ -23,6 +23,8 @@ import org.whispersystems.textsecure.api.crypto.UntrustedIdentityException;
import org.whispersystems.textsecure.api.messages.TextSecureAttachmentStream;
import org.whispersystems.textsecure.api.messages.multidevice.DeviceContact;
import org.whispersystems.textsecure.api.messages.multidevice.DeviceContactsOutputStream;
import org.whispersystems.textsecure.api.messages.multidevice.TextSecureSyncMessage;
import org.whispersystems.textsecure.api.push.exceptions.PushNetworkException;
import java.io.ByteArrayInputStream;
import java.io.File;
@@ -79,7 +81,7 @@ public class MultiDeviceContactUpdateJob extends MasterSecretJob implements Inje
@Override
public boolean onShouldRetryThrowable(Exception exception) {
if (exception instanceof NetworkException) return true;
if (exception instanceof PushNetworkException) return true;
return false;
}
@@ -102,7 +104,7 @@ public class MultiDeviceContactUpdateJob extends MasterSecretJob implements Inje
contactsFile.length());
try {
messageSender.sendMultiDeviceContactsUpdate(attachmentStream);
messageSender.sendMessage(TextSecureSyncMessage.forContacts(attachmentStream));
} catch (IOException ioe) {
throw new NetworkException(ioe);
}