Rocket.Chat.js.SDK icon indicating copy to clipboard operation
Rocket.Chat.js.SDK copied to clipboard

methodCall not getting rejected

Open uncledent opened this issue 6 years ago • 5 comments

React Native When doing method call on being offline, the call never gets rejected.

return this.sdk.methodCall(
      type ? 'createPrivateGroup' : 'createChannel',
      name,
      users,
      readOnly,
      {},
 { broadcast }
    );

It stays unresolved for ever. Any idea why?

uncledent avatar Feb 19 '19 20:02 uncledent

I see that you reject if connection disconnected in ddp.send metjod

this.once('disconnected', reject);

But the 'disconnected' event is never emitted

uncledent avatar Feb 19 '19 21:02 uncledent

I also can't find the branch with the latest alpha version 25

uncledent avatar Feb 19 '19 22:02 uncledent

I have fixed it here: https://github.com/uncledent/Rocket.Chat.js.SDK/tree/reject-on-ddp-close Please tell me the branch to make a pull request to

uncledent avatar Feb 20 '19 00:02 uncledent

@uncledent Nice! Open to multiple-clients

diegolmello avatar Feb 20 '19 01:02 diegolmello

@diegolmello i have created a pull request: https://github.com/RocketChat/Rocket.Chat.js.SDK/pull/61

I would really appreciate if you could push today a new version to the npm as a new alpha! Thank you in advance!

uncledent avatar Feb 20 '19 08:02 uncledent