mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-27 04:45:20 +00:00
Clear peer-scoped retry state on acks without a conversation
After force-quit -> relaunch the durable outbox is restored while the in-memory conversation store is not. updateAcknowledgedMessageDeliveryStatus gated the router-side clear on the conversation lookup, so a delivery ack for a retried message was discarded and the already-delivered message re-sent on every flush/auth event until the attempt cap marked it failed. Always run the peer-scoped router clear (markDelivered(_:from:) only terminalizes the acking peer's own queues); gate only the UI status transition and the media-retry release on the conversation holding the message, mirroring the Nostr path in ChatPrivateConversationCoordinator.handleDelivered. Also drop the dead allowedPeerIDs parameter on MessageRouter.clearRetainedMessage (only ever called with nil; its filter branch paired a scoped in-memory removal with an unscoped store tombstone) and the redundant manual ==/hash on PeerMessageKey. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -750,6 +750,7 @@ private final class PerfDeliveryContext: ChatDeliveryContext {
|
||||
func notifyUIChanged() {}
|
||||
func markMessageDelivered(_ messageID: String) {}
|
||||
func markMessageDelivered(_ messageID: String, from peerIDs: Set<PeerID>) {}
|
||||
func confirmPrivateMediaDelivery(_ messageID: String) {}
|
||||
func isOutgoingPrivateMessage(_ messageID: String, toAny peerIDs: Set<PeerID>) -> Bool {
|
||||
true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user