Commit Graph
6 Commits
Author SHA1 Message Date
Nelson Campos 9aca65a2a4 fix: prevent phantom spaces and duplicates in message sync
- Add deduplication check when adding messages to retry queue
- Prevent duplicate messages with same ID from being queued
- Maintain proper message ordering during sync
2025-07-07 23:47:52 -03:00
Nelson Campos edb30d6c80 fix: ensure messages maintain correct order during sync
- Sort retry queue by original timestamp when adding and processing messages
- Add 50ms delay between retry messages to prevent out-of-order delivery
- Messages now sync in the exact order they were sent (ping 1, ping 2, ping 3)
2025-07-07 23:42:33 -03:00
Nelson Campos a3fa7a892f fix: prevent phantom empty messages during sync
- Add content validation to skip empty or whitespace-only messages
- Apply validation in both channel and regular message handling
- Add validation at retry service level to prevent queuing empty messages
- This fixes the phantom space issue between synced messages
2025-07-07 23:36:10 -03:00
Nelson Campos 9c60d46745 fix: change roomKey to channelKey after merge 2025-07-07 23:30:38 -03:00
Nelson Campos 6187b48bf4 Merge upstream/main: Adopt channel terminology while preserving bug fixes 2025-07-07 23:27:12 -03:00
Nelson Campos 602657fec2 Enhance message handling and synchronization in BluetoothMeshService
- Introduce thread safety for recentlySentMessages using NSLock to prevent race conditions.
- Adjust message delay parameters for faster synchronization: reduce min/max message delays and adjust initial announce timing.
- Update sendMessage and sendEncryptedRoomMessage methods to accept optional messageID and timestamp parameters for better tracking.
- Improve message deduplication logic in ChatViewModel to prevent duplicates from being added when echoing back sent messages.
- Modify MessageRetryService to include original message ID and timestamp for better retry handling.
2025-07-07 23:19:24 -03:00