chore(@rocket.chat/ddp-client): introduce experimental Meteor independent DDP client (re-add)
Merged
GG
6mo ago+1688+1688+0123456789012345678901234567890123456789-102-102-012345678901234567890123456789
Summary
Re-adds the experimental SDK-over-DDP transport originally landed in #40301, with two regression fixes found while validating the legacy (flag-off) path.
- Re-applies the
Use_RC_SDKadmin setting and the@rocket.chat/ddp-client-backed transport from #40301. Default remains off โ the migration ships dormant. - Forwards the original DDP-encoded
resultframe frommethod.call/method.callAnonREST responses back into Meteor's_streamHandlersinstead of synthesising anerror: 'unknown'envelope. Without this,withAsyncTOTPno longer recognisedtotp-requiredand the 2FA modal never opened for any Meteor method protected bytwoFactorRequired. - Restores the
{ ...Meteor.status() }spread inServerProvider.getStatuson the legacy path.Meteor.status()reuses the same internal object (mutated in place), so dropping the spread madeuseSyncExternalStoresee an unchanged snapshot andConnectionStatusBarfroze on connect/drop.
Test plan
- With
Use_RC_SDKoff (default), trigger a Meteor method protected bytwoFactorRequired(e.g.saveUserProfilefor a user with TOTP enabled) and confirm the TOTP modal opens and the call resolves once a valid code is submitted. - With
Use_RC_SDKoff, drop the network and confirmConnectionStatusBarflips to "waiting"/"connecting" and back to "connected" without a hard reload. - With
Use_RC_SDKon (URL?sdk_transport=onor admin setting), smoke test login, message send, presence, and force-logout.
Task: ARCH-2127
Summary by CodeRabbit
-
New Features
- Added experimental "Use Rocket.Chat SDK" admin setting (General โ General Settings) to enable alternative DDP transport for real-time communications.
- Transport selection can be controlled per-tab via URL parameter or browser storage for testing purposes.
-
Chores
- Added SDK transport layer dependencies.