mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 21:15:48 +00:00
Send an empty group sync when linking devices if no groups exist.
This commit is contained in:
@@ -869,6 +869,7 @@ public class SignalServiceMessageSender {
|
||||
private byte[] createMultiDeviceGroupsContent(SignalServiceAttachmentStream groups) throws IOException {
|
||||
Content.Builder container = Content.newBuilder();
|
||||
SyncMessage.Builder builder = createSyncMessageBuilder();
|
||||
|
||||
builder.setGroups(SyncMessage.Groups.newBuilder()
|
||||
.setBlob(createAttachmentPointer(groups)));
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import org.whispersystems.libsignal.util.guava.Optional;
|
||||
import org.whispersystems.signalservice.internal.push.http.CancelationSignal;
|
||||
import org.whispersystems.signalservice.internal.push.http.ResumableUploadSpec;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.InputStream;
|
||||
|
||||
public abstract class SignalServiceAttachment {
|
||||
@@ -39,6 +40,10 @@ public abstract class SignalServiceAttachment {
|
||||
return new Builder();
|
||||
}
|
||||
|
||||
public static SignalServiceAttachmentStream emptyStream(String contentType) {
|
||||
return new SignalServiceAttachmentStream(new ByteArrayInputStream(new byte[0]), contentType, 0, Optional.absent(), false, false, null, null);
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
|
||||
private InputStream inputStream;
|
||||
|
||||
Reference in New Issue
Block a user