avoid keeping delivery tasks in propagated state when check store is disabled

This commit is contained in:
Ivan FB 2026-04-30 19:22:10 +02:00
parent 587014e34f
commit a97de2abf6
No known key found for this signature in database
GPG Key ID: DF0C67A04C543270

View File

@ -225,9 +225,10 @@ proc evaluateAndCleanUp(self: SendService) =
it.state != DeliveryState.FailedToDeliver
)
# remove propagated ephemeral messages as no store check is possible
# remove propagated messages when no store confirmation will follow
self.taskCache.keepItIf(
not (it.isEphemeral() and it.state == DeliveryState.SuccessfullyPropagated)
not (it.state == DeliveryState.SuccessfullyPropagated and
(it.isEphemeral() or not self.checkStoreForMessages))
)
proc trySendMessages(self: SendService) {.async.} =