mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-26 19:56:02 +01:00
Fix story sync message behaviour between iOS and Android.
This commit is contained in:
committed by
Cody Henthorne
parent
e5d196c642
commit
7945b3c971
@@ -278,6 +278,11 @@ public class SignalServiceMessageSender {
|
||||
Set<SignalServiceStoryMessageRecipient> manifest)
|
||||
throws IOException, UntrustedIdentityException
|
||||
{
|
||||
if (manifest.isEmpty()) {
|
||||
Log.w(TAG, "Refusing to send sync message for empty manifest.");
|
||||
return;
|
||||
}
|
||||
|
||||
SignalServiceSyncMessage syncMessage = createSelfSendSyncMessageForStory(message, timestamp, isRecipientUpdate, manifest);
|
||||
sendSyncMessage(syncMessage, Optional.empty());
|
||||
}
|
||||
@@ -300,8 +305,7 @@ public class SignalServiceMessageSender {
|
||||
List<SendMessageResult> sendMessageResults = sendGroupMessage(distributionId, recipients, unidentifiedAccess, timestamp, content, ContentHint.IMPLICIT, groupId, false, SenderKeyGroupEvents.EMPTY, false, true);
|
||||
|
||||
if (aciStore.isMultiDevice()) {
|
||||
SignalServiceSyncMessage syncMessage = createSelfSendSyncMessageForStory(message, timestamp, isRecipientUpdate, manifest);
|
||||
sendSyncMessage(syncMessage, Optional.empty());
|
||||
sendStorySyncMessage(message, timestamp, isRecipientUpdate, manifest);
|
||||
}
|
||||
|
||||
return sendMessageResults;
|
||||
|
||||
@@ -763,8 +763,10 @@ public final class SignalServiceContent {
|
||||
|
||||
if (!address.isPresent() &&
|
||||
!dataMessage.flatMap(SignalServiceDataMessage::getGroupContext).isPresent() &&
|
||||
!storyMessage.flatMap(SignalServiceStoryMessage::getGroupContext).isPresent()) {
|
||||
throw new InvalidMessageStructureException("SyncMessage missing both destination and group ID!");
|
||||
!storyMessage.flatMap(SignalServiceStoryMessage::getGroupContext).isPresent() &&
|
||||
recipientManifest.isEmpty())
|
||||
{
|
||||
throw new InvalidMessageStructureException("SyncMessage missing destination, group ID, and recipient manifest!");
|
||||
}
|
||||
|
||||
for (SignalServiceProtos.SyncMessage.Sent.UnidentifiedDeliveryStatus status : sentContent.getUnidentifiedStatusList()) {
|
||||
|
||||
Reference in New Issue
Block a user