Skip to content

Commit

Permalink
fix: In at_notification.dart check for "publicKeyHash" for null check
Browse files Browse the repository at this point in the history
  • Loading branch information
sitaram-kalluri committed Dec 17, 2024
1 parent d42b7df commit 44aade2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/at_client/lib/src/response/at_notification.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class AtNotification {
metadata.sharedKeyEnc = json['metadata'][AtConstants.sharedKeyEncrypted];
// AtContants.sharedWithPublicKeyHash will be sent by the server starting v3.0.52
// Notifications received from Secondary server before 3.0.52 does not contain
// AtConstants.sharedWithPublicKeyHash. Therefore, check for null String.
if (json['metadata'][AtConstants.sharedWithPublicKeyHash] != "null") {
// AtConstants.sharedWithPublicKeyHash. Therefore, check for null.
if (json['metadata'][AtConstants.sharedWithPublicKeyHash] != null) {
var publicKeyHash =
jsonDecode(json['metadata'][AtConstants.sharedWithPublicKeyHash]);
metadata.pubKeyHash =
Expand Down

0 comments on commit 44aade2

Please sign in to comment.