File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
packages/neon/neon/lib/src Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -38,12 +38,13 @@ class PushNotification {
38
38
/// Use [PushNotification.fromJson] when the [subject] is not encrypted.
39
39
factory PushNotification .fromEncrypted (
40
40
final Map <String , dynamic > json,
41
+ final String accountID,
41
42
final RSAPrivateKey privateKey,
42
43
) {
43
44
final subject = decryptPushNotificationSubject (privateKey, json[_subjectKey] as String );
44
45
45
46
return PushNotification (
46
- accountID: json[_accountIDKey] as String ,
47
+ accountID: accountID ,
47
48
priority: json[_priorityKey] as String ,
48
49
type: json[_typeKey] as String ,
49
50
subject: subject,
Original file line number Diff line number Diff line change @@ -79,7 +79,11 @@ class PushUtils {
79
79
final keypair = loadRSAKeypair ();
80
80
for (final message in Uri (query: utf8.decode (messages)).queryParameters.values) {
81
81
final data = json.decode (message) as Map <String , dynamic >;
82
- final pushNotification = PushNotification .fromEncrypted (data, keypair.privateKey);
82
+ final pushNotification = PushNotification .fromEncrypted (
83
+ data,
84
+ instance,
85
+ keypair.privateKey,
86
+ );
83
87
84
88
if (pushNotification.subject.delete ?? false ) {
85
89
await localNotificationsPlugin.cancel (_getNotificationID (instance, pushNotification));
You can’t perform that action at this time.
0 commit comments