fix(chat): prevent poll-triggered reload after send by using server timestamp

The 60s checkForUpdates poll was detecting has_updates due to clock skew
between client and server timestamps. Now the send API returns the server
timestamp, and the frontend uses it for markChannelAsRead — ensuring the
poll sees no updates for own sent messages.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
MarekWo
2026-03-31 10:28:54 +02:00
parent 6eb2250d88
commit 29e5e6982d
4 changed files with 14 additions and 12 deletions
+1 -1
View File
@@ -1252,7 +1252,7 @@ class DeviceManager:
'id': msg_id,
}, namespace='/chat')
return {'success': True, 'message': 'Message sent', 'id': msg_id}
return {'success': True, 'message': 'Message sent', 'id': msg_id, 'timestamp': ts}
except Exception as e:
logger.error(f"Failed to send channel message: {e}")