diff --git a/.pubnub.yml b/.pubnub.yml index 45cfc832..0dd06ee9 100644 --- a/.pubnub.yml +++ b/.pubnub.yml @@ -1,5 +1,10 @@ --- changelog: + - date: 2024-04-15 + version: v4.3.4 + changes: + - type: bug + text: "Fixes issue of parsing invalid presence data (which are not from pubnub server) in subscription." - date: 2024-03-28 version: v4.3.3 changes: @@ -447,7 +452,7 @@ supported-platforms: platforms: - "Dart SDK >=2.6.0 <3.0.0" version: "PubNub Dart SDK" -version: "4.3.3" +version: "4.3.4" sdks: - full-name: PubNub Dart SDK diff --git a/pubnub/CHANGELOG.md b/pubnub/CHANGELOG.md index cfd6621e..d29e04a7 100644 --- a/pubnub/CHANGELOG.md +++ b/pubnub/CHANGELOG.md @@ -1,3 +1,9 @@ +## v4.3.4 +April 15 2024 + +#### Fixed +- Fixes issue of parsing invalid presence data (which are not from pubnub server) in subscription. + ## v4.3.3 March 28 2024 diff --git a/pubnub/README.md b/pubnub/README.md index a05902d1..f2a577f6 100644 --- a/pubnub/README.md +++ b/pubnub/README.md @@ -14,7 +14,7 @@ To add the package to your Dart or Flutter project, add `pubnub` as a dependency ```yaml dependencies: - pubnub: ^4.3.3 + pubnub: ^4.3.4 ``` After adding the dependency to `pubspec.yaml`, run the `dart pub get` command in the root directory of your project (the same that the `pubspec.yaml` is in). diff --git a/pubnub/lib/src/core/core.dart b/pubnub/lib/src/core/core.dart index 4e61b252..e297e35b 100644 --- a/pubnub/lib/src/core/core.dart +++ b/pubnub/lib/src/core/core.dart @@ -21,7 +21,7 @@ class Core { /// Internal module responsible for supervising. SupervisorModule supervisor = SupervisorModule(); - static String version = '4.3.3'; + static String version = '4.3.4'; Core( {Keyset? defaultKeyset, diff --git a/pubnub/lib/src/subscribe/subscription.dart b/pubnub/lib/src/subscribe/subscription.dart index 0760446a..0daf9cdf 100644 --- a/pubnub/lib/src/subscribe/subscription.dart +++ b/pubnub/lib/src/subscribe/subscription.dart @@ -62,9 +62,10 @@ class Subscription { /// Will only emit when [withPresence] is true. Stream get presence => _envelopesController.stream .where((envelope) => - presenceChannels.contains(envelope.channel) || - presenceChannels.contains(envelope.subscriptionPattern) || - presenceChannelGroups.contains(envelope.subscriptionPattern)) + envelope.userMeta != null && + (presenceChannels.contains(envelope.channel) || + presenceChannels.contains(envelope.subscriptionPattern) || + presenceChannelGroups.contains(envelope.subscriptionPattern))) .map((envelope) => PresenceEvent.fromEnvelope(envelope)); final Completer _cancelCompleter = Completer(); diff --git a/pubnub/pubspec.yaml b/pubnub/pubspec.yaml index 7f7b44a7..d2e396fa 100644 --- a/pubnub/pubspec.yaml +++ b/pubnub/pubspec.yaml @@ -1,6 +1,6 @@ name: pubnub description: PubNub SDK v5 for Dart lang (with Flutter support) that allows you to create real-time applications -version: 4.3.3 +version: 4.3.4 homepage: https://www.pubnub.com/docs/sdks/dart environment: