pubnub / pubnub-angular2

Other
32 stars 13 forks source link

Autoload not working #32

Open Aedhen opened 6 years ago

Aedhen commented 6 years ago

Hi,

Autoload does not appear to be working. In following piece of code, ‘msg’ will be undefined:

this.pubnub.subscribe({
      channels: channels,
      triggerEvents: ['message', 'status'],
      withPresence: false,
      autoload: 1 
});
this.pubnub.getMessage(channels, msg => this.doSomething(msg, callback));

When I replace the autoload with a timetoken however, I do get a result so my other code does work. Am I missing something or does autoload not work? I’m using pubnub-angular2 v1.3.0.

Thanks.