Skip to content

Commit b0437d4

Browse files
committed
"encrypted message" on push if decryption fails
1 parent 8249aaa commit b0437d4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

android/app/src/main/java/chat/rocket/reactnative/notification/CustomPushNotification.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,13 @@ private void handleE2ENotification(Bundle bundle, Ejson ejson, String notId) {
208208
ejson = safeFromJson(bundle.getString("ejson", "{}"), Ejson.class);
209209
showNotification(bundle, ejson, notId);
210210
} else {
211-
Log.e(TAG, "E2E decryption failed, notification will not be shown");
211+
Log.e(TAG, "E2E decryption failed, showing fallback notification");
212+
// Show fallback notification instead of silently dropping it
213+
// This ensures users are notified even if decryption fails
214+
bundle.putString("message", "Encrypted message");
215+
mBundle = bundle;
216+
ejson = safeFromJson(bundle.getString("ejson", "{}"), Ejson.class);
217+
showNotification(bundle, ejson, notId);
212218
}
213219
}
214220

0 commit comments

Comments
 (0)