Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ignore read cache when updating TSAttachment schema version
Browse files Browse the repository at this point in the history
harry-signal authored and sashaweiss-signal committed Nov 5, 2024
1 parent 8a92765 commit 0fe142d
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -339,7 +339,8 @@ extension ForwardMessageViewController {
let interactionId = item.interaction?.uniqueId,
let latestInteraction = TSInteraction.anyFetch(
uniqueId: interactionId,
transaction: transaction
transaction: transaction,
ignoreCache: true
),
hasRenderableContent(interaction: latestInteraction, tx: transaction)
else {
3 changes: 2 additions & 1 deletion SignalServiceKit/Messages/Attachments/TSAttachment.m
Original file line number Diff line number Diff line change
@@ -276,7 +276,8 @@ - (void)upgradeAttachmentSchemaVersionIfNecessary
// Async save the schema update in the database
DatabaseStorageAsyncWrite(SSKEnvironment.shared.databaseStorageRef, ^(SDSAnyWriteTransaction *transaction) {
TSAttachment *_Nullable latestInstance = [TSAttachment anyFetchWithUniqueId:self.uniqueId
transaction:transaction];
transaction:transaction
ignoreCache:true];
if (latestInstance == nil) {
return;
}

0 comments on commit 0fe142d

Please sign in to comment.