mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-26 01:45:18 +00:00
Fix read receipts using wrong peer ID
- Read receipts were being sent to the current ephemeral peer ID instead of the message's senderPeerID - This caused read receipts to be lost when peer IDs changed between sessions - Now using message.senderPeerID consistently for all read receipt sending - Added detailed logging to track which peer ID receives the read receipt
This commit is contained in:
@@ -708,6 +708,7 @@ class BluetoothMeshService: NSObject {
|
||||
}
|
||||
|
||||
func sendReadReceipt(_ receipt: ReadReceipt, to recipientID: String) {
|
||||
print("[DeliveryTracker] Sending read receipt for message \(receipt.originalMessageID) to \(recipientID)")
|
||||
messageQueue.async { [weak self] in
|
||||
guard let self = self else { return }
|
||||
|
||||
@@ -737,6 +738,7 @@ class BluetoothMeshService: NSObject {
|
||||
ttl: 3 // Limited TTL for receipts
|
||||
)
|
||||
|
||||
print("[DeliveryTracker] Broadcasting read receipt packet to \(recipientID)")
|
||||
// Send immediately without delay
|
||||
self.broadcastPacket(packet)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user