Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Commit 9a4970f

Browse files
committed
Copy twi_body to message to support Twilio.
1 parent 5b34f15 commit 9a4970f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

android/src/main/java/com/dieam/reactnativepushnotification/modules/RNPushNotificationListenerService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ public class RNPushNotificationListenerService extends GcmListenerService {
2727
@Override
2828
public void onMessageReceived(String from, final Bundle bundle) {
2929
JSONObject data = getPushData(bundle.getString("data"));
30+
// Copy `twi_body` to `message`
31+
if (bundle.containsKey("twi_body")) {
32+
bundle.putString("message", bundle.getString("twi_body"));
33+
}
34+
3035
if (data != null) {
3136
if (!bundle.containsKey("message")) {
3237
bundle.putString("message", data.optString("alert", "Notification received"));

0 commit comments

Comments
 (0)