Do not fail message inserts on bad quote attachments.

Fixes #12721
This commit is contained in:
Greyson Parrelli 2023-02-13 11:47:11 -05:00
parent 22cad64089
commit c0fe156897

View file

@ -812,10 +812,14 @@ public class AttachmentTable extends DatabaseTable {
Log.i(TAG, "Inserted attachment at ID: " + attachmentId);
}
for (Attachment attachment : quoteAttachment) {
AttachmentId attachmentId = insertAttachment(mmsId, attachment, true);
insertedAttachments.put(attachment, attachmentId);
Log.i(TAG, "Inserted quoted attachment at ID: " + attachmentId);
try {
for (Attachment attachment : quoteAttachment) {
AttachmentId attachmentId = insertAttachment(mmsId, attachment, true);
insertedAttachments.put(attachment, attachmentId);
Log.i(TAG, "Inserted quoted attachment at ID: " + attachmentId);
}
} catch (MmsException e) {
Log.w(TAG, "Failed to insert quote attachment! messageId: " + mmsId);
}
return insertedAttachments;