mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
Fix caption sending for outgoing image and video stories.
This commit is contained in:
committed by
Greyson Parrelli
parent
c863e9ed4d
commit
0a07800eba
@@ -74,7 +74,6 @@ import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId;
|
||||
import org.thoughtcrime.securesms.recipients.RecipientUtil;
|
||||
import org.thoughtcrime.securesms.service.ExpiringMessageManager;
|
||||
import org.thoughtcrime.securesms.stories.Stories;
|
||||
import org.thoughtcrime.securesms.util.ParcelUtil;
|
||||
import org.thoughtcrime.securesms.util.SignalLocalMetrics;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
@@ -236,6 +235,11 @@ public class MessageSender {
|
||||
null);
|
||||
|
||||
attachmentDatabase.updateMessageId(preUploadAttachmentIds, primaryMessageId, primaryMessage.getStoryType().isStory());
|
||||
if (primaryMessage.getStoryType() != StoryType.NONE) {
|
||||
for (final AttachmentId preUploadAttachmentId : preUploadAttachmentIds) {
|
||||
attachmentDatabase.updateAttachmentCaption(preUploadAttachmentId, primaryMessage.getBody());
|
||||
}
|
||||
}
|
||||
messageIds.add(primaryMessageId);
|
||||
|
||||
List<DatabaseAttachment> preUploadAttachments = Stream.of(preUploadAttachmentIds)
|
||||
@@ -265,6 +269,12 @@ public class MessageSender {
|
||||
}
|
||||
|
||||
attachmentDatabase.updateMessageId(attachmentIds, messageId, secondaryMessage.getStoryType().isStory());
|
||||
if (primaryMessage.getStoryType() != StoryType.NONE) {
|
||||
for (final AttachmentId preUploadAttachmentId : preUploadAttachmentIds) {
|
||||
attachmentDatabase.updateAttachmentCaption(preUploadAttachmentId, primaryMessage.getBody());
|
||||
}
|
||||
}
|
||||
|
||||
messageIds.add(messageId);
|
||||
}
|
||||
|
||||
@@ -294,6 +304,7 @@ public class MessageSender {
|
||||
} else {
|
||||
AttachmentId attachmentCopyId = attachmentDatabase.insertAttachmentForPreUpload(preUploadAttachment.get()).getAttachmentId();
|
||||
attachmentDatabase.updateMessageId(Collections.singletonList(attachmentCopyId), messageId, true);
|
||||
attachmentDatabase.updateAttachmentCaption(attachmentCopyId, storyMessage.getOutgoingSecureMediaMessage().getBody());
|
||||
messageIds.add(messageId);
|
||||
messages.add(storyMessage.getOutgoingSecureMediaMessage());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user