|
|
@ -90,6 +90,7 @@ public extension DisappearingMessagesJob {
|
|
|
|
// If there were no changes then none of the provided `interactionIds` are expiring messages
|
|
|
|
// If there were no changes then none of the provided `interactionIds` are expiring messages
|
|
|
|
guard (changeCount ?? 0) > 0 else { return nil }
|
|
|
|
guard (changeCount ?? 0) > 0 else { return nil }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if DisappearingMessagesConfiguration.isNewConfigurationEnabled {
|
|
|
|
interactionsByExpiresInSeconds?.forEach { expiresInSeconds, interactions in
|
|
|
|
interactionsByExpiresInSeconds?.forEach { expiresInSeconds, interactions in
|
|
|
|
let serverHashes = interactions.compactMap { $0.serverHash }
|
|
|
|
let serverHashes = interactions.compactMap { $0.serverHash }
|
|
|
|
guard let expiresInSeconds = expiresInSeconds, !serverHashes.isEmpty else { return }
|
|
|
|
guard let expiresInSeconds = expiresInSeconds, !serverHashes.isEmpty else { return }
|
|
|
@ -127,6 +128,7 @@ public extension DisappearingMessagesJob {
|
|
|
|
)
|
|
|
|
)
|
|
|
|
.retainUntilComplete()
|
|
|
|
.retainUntilComplete()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return updateNextRunIfNeeded(db)
|
|
|
|
return updateNextRunIfNeeded(db)
|
|
|
|
}
|
|
|
|
}
|
|
|
|