Fix potential crash in story send.

Fixes #14331
This commit is contained in:
Greyson Parrelli
2025-09-17 11:50:01 -04:00
parent 43f6e0ad8e
commit c5397bc7d2

View File

@@ -105,6 +105,11 @@ public final class PushDistributionListSendJob extends PushSendJob {
}
if (!message.getStoryType().isTextStory()) {
if (message.getAttachments().isEmpty()) {
Log.w(TAG, "No attachments found for message " + messageId + ". Ignoring.");
return;
}
DatabaseAttachment storyAttachment = (DatabaseAttachment) message.getAttachments().get(0);
SignalDatabase.attachments().updateAttachmentCaption(storyAttachment.attachmentId, message.getBody());
}