pubnub / dart

PubNub Dart SDK
Other
27 stars 15 forks source link

Ignore flag 'withPresence'. #40

Closed alecxandrys closed 3 years ago

alecxandrys commented 3 years ago

Good day, I use next code: pubnub! .subscribe(channels: _channelsList.toSet(), withPresence: false)

After a while app catch a next message:

изображение изображение

For some reason i have received message from Presence channel. It's provoke a enormous spam of Envelope in eventHandler.

pubnub: 3.1.0
environment:
  sdk: ">=2.12.0 <3.0.0"
  flutter: ^2.0.1
are commented 3 years ago

Hi there! Thanks for reporting the issue. With withPresence set to false, the Subscription should not be receiving those messages. Can you please share what channels are you subscribing to (so basically what is in _channelsList) and how are you listening for those messages?

Are you doing subscription.messages or subscription.presence?

are commented 3 years ago

So I was actually able to reproduce the same behavior.

This is an interaction between the Presence system and Wildcard subscribes. To illustrate:

Unfortunately this is the intended behavior and the SDK in this case behaves correctly. However there are possible solutions for this but they go outside of the scope of the SDK. My recommendation is to contact PubNub Support.