Skip to content

1.3.9

Choose a tag to compare

@scottinet scottinet released this 29 Jan 09:37
· 1885 commits to master since this release
  • created the renewAllSubscriptions internal function and replaced all subscriptions renewals by a call to this function, to avoid repetition of code
  • created the emitEvent internal function and replaced all event emissions by a call to this function, to avoid repetition of code
  • removed loginStrategy, loginCredentials and loginExpiresIn Kuzzle properties.
  • The Kuzzle object does not login automatically anymore. An explicit call to Kuzzle.login() must be performed
  • Once successfully logged in, all subscriptions are now automatically renewed. This is to avoid having subscriptions not getting notifications anymore because of a token expiration.
  • Added a timer in the KuzzleRoom object, in order to avoid renewals to be executed successively. For instance, when connecting manually to Kuzzle, this call chain would perform 1 unnecessary renewal:
var room = kuzzle
  .dataCollectionFactory('foo', 'bar')
  .subscribe({}, function (err, res) { /* */ });

kuzzle
  .connect()    // <= will trigger a susbcriptions renewal
  .login(...);  // delayed after connect() succeeds. Then triggers a subscriptions renewal.