diff --git a/packages/at_client/lib/src/response/at_notification.dart b/packages/at_client/lib/src/response/at_notification.dart index 9e14df2d2..0e1948088 100644 --- a/packages/at_client/lib/src/response/at_notification.dart +++ b/packages/at_client/lib/src/response/at_notification.dart @@ -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 =