diff --git a/SessionMessagingKit/Jobs/Types/DisappearingMessagesJob.swift b/SessionMessagingKit/Jobs/Types/DisappearingMessagesJob.swift index ef4b529f8..002965ec1 100644 --- a/SessionMessagingKit/Jobs/Types/DisappearingMessagesJob.swift +++ b/SessionMessagingKit/Jobs/Types/DisappearingMessagesJob.swift @@ -56,7 +56,7 @@ public extension DisappearingMessagesJob { // If there is another expiring message then update the job to run 1 second after it's meant to expire let nextExpirationTimestampMs: Double? = try? Interaction .filter(Interaction.Columns.expiresStartedAtMs != nil) - .filter(Interaction.Columns.expiresInSeconds > 0) + .filter(Interaction.Columns.expiresInSeconds != 0) .select(Interaction.Columns.expiresStartedAtMs + (Interaction.Columns.expiresInSeconds * 1000)) .order((Interaction.Columns.expiresStartedAtMs + (Interaction.Columns.expiresInSeconds * 1000)).asc) .asRequest(of: Double.self) @@ -88,7 +88,7 @@ public extension DisappearingMessagesJob { .filter( Interaction.Columns.threadId == threadId && Interaction.Columns.timestampMs <= lastReadTimestampMs && - Interaction.Columns.expiresInSeconds > 0 && + Interaction.Columns.expiresInSeconds != 0 && Interaction.Columns.expiresStartedAtMs == nil ) .select( @@ -129,7 +129,7 @@ public extension DisappearingMessagesJob { let interactionExpirationInfosByExpiresInSeconds: [TimeInterval: [ExpirationInfo]] = (try? Interaction .filter(interactionIds.contains(Interaction.Columns.id)) .filter( - Interaction.Columns.expiresInSeconds > 0 && + Interaction.Columns.expiresInSeconds != 0 && Interaction.Columns.expiresStartedAtMs == nil ) .select( @@ -146,7 +146,7 @@ public extension DisappearingMessagesJob { let changeCount: Int? = try? Interaction .filter(interactionIds.contains(Interaction.Columns.id)) .filter( - Interaction.Columns.expiresInSeconds > 0 && + Interaction.Columns.expiresInSeconds != 0 && Interaction.Columns.expiresStartedAtMs == nil ) .updateAll( diff --git a/SessionMessagingKit/Jobs/Types/GarbageCollectionJob.swift b/SessionMessagingKit/Jobs/Types/GarbageCollectionJob.swift index 49431b377..3322fa825 100644 --- a/SessionMessagingKit/Jobs/Types/GarbageCollectionJob.swift +++ b/SessionMessagingKit/Jobs/Types/GarbageCollectionJob.swift @@ -296,7 +296,7 @@ public enum GarbageCollectionJob: JobExecutor { /// Remove interactions which should be disappearing after read but never be read within 14 days if finalTypesToCollect.contains(.expiredUnreadDisappearingMessages) { _ = try Interaction - .filter(Interaction.Columns.expiresInSeconds > 0) + .filter(Interaction.Columns.expiresInSeconds != 0) .filter(Interaction.Columns.expiresStartedAtMs == nil) .filter(Interaction.Columns.timestampMs < (timestampNow - fourteenDaysInSeconds) * 1000) .deleteAll(db)