Refactor: Migrating from RocketChat SDK to DDPSDK of Rocket.Chat
Proposed changes
This Pull Request updates the EmbeddedChat API and EmbeddedChat Auth to use the new DDPSDK of RocketChat instead of the Rocket.Chat SDK.
Fixes: N/A
Video/Screenshots
PR Test Details
Note: The PR will be ready for live testing at https://rocketchat.github.io/EmbeddedChat/pulls/pr-1009 after approval. Contributors are requested to replace <pr_number> with the actual PR number.
I think the way RC is recommending handling real-time communication is by using this: https://developer.rocket.chat/apidocs/realtimeapi
I'm not sure, though, how actively the DDP SDK is maintained.
Is this package "https://www.npmjs.com/package/@rocket.chat/ddp-client" using the same realtime api's defined in the doc, can you check once in your free time
Hey @Spiral-Memory, you might see some of the methods are still using fetch instead of DDPSDK's REST API because some of these methods are giving 401 unauthorized or 403 forbidden error message...I have tried debugging it but still it was giving the same error so kept those methods to use fetch
One of the reason of these errors could be some of the endpoints are not supported by DDPSDK's REST right now..maybe in future they will work as expected.
I have added a comment above those methods which are still using fetch
Thanks @devanshkansagra for this, Please let me know once you've finalized this PR. Thanks
Ok