chore: undo loadMissedMessages deprecation from #40711
Proposed changes
Follow-up to #40711.
Reverts the loadMissedMessages deprecation introduced in #40711.
#40711 migrated the reconnect catch-up hook (useLoadMissedMessages) from the loadMissedMessages DDP method to /v1/chat.syncMessages, and marked the method deprecated. chat.syncMessages is the right long-term target — it queries by _updatedAt (+ the trash collection), so on reconnect it also reconciles edits and deletions made while offline, not just new messages.
However, that query is currently too slow for the reconnect path. This PR rolls the hook back to the loadMissedMessages DDP method and removes the premature deprecation notice. A TODO(ddp-removal) is left in the hook documenting that we should move to chat.syncMessages once the query is optimized.
Changes
useLoadMissedMessages→ calls theloadMissedMessagesDDP method again (with aTODOto revisitchat.syncMessages).loadMissedMessagesmethod → deprecation notice removed.
An earlier iteration of this branch explored a room-type-agnostic /v1/chat.history endpoint as the replacement; that was dropped in favor of simply reverting the deprecation until the chat.syncMessages query is fast enough.
How to test
- Drop the connection, post messages from another session, restore the connection → missed messages appear on reconnect (via the DDP method).
- No
loadMissedMessagesdeprecation warning is logged on use.
ARCH-2164
Summary by CodeRabbit
- Refactor
- Updated how the app retrieves messages that were missed during offline periods
- Removed deprecated logging from the message-retrieval system