From 29c27417bdc1934d9d0c2f55a3f39554083f8b43 Mon Sep 17 00:00:00 2001 From: Miguel Alatzar Date: Mon, 9 Dec 2019 12:14:50 -0700 Subject: [PATCH] Add channel ID to push notification sent on failed reply (#3673) --- .../mattermost/rnbeta/NotificationReplyBroadcastReceiver.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/android/app/src/main/java/com/mattermost/rnbeta/NotificationReplyBroadcastReceiver.java b/android/app/src/main/java/com/mattermost/rnbeta/NotificationReplyBroadcastReceiver.java index 521f6b7bc..8f1248e65 100644 --- a/android/app/src/main/java/com/mattermost/rnbeta/NotificationReplyBroadcastReceiver.java +++ b/android/app/src/main/java/com/mattermost/rnbeta/NotificationReplyBroadcastReceiver.java @@ -133,12 +133,16 @@ public class NotificationReplyBroadcastReceiver extends BroadcastReceiver { String packageName = mContext.getPackageName(); int smallIconResId = res.getIdentifier("ic_notification", "mipmap", packageName); + Bundle userInfoBundle = new Bundle(); + userInfoBundle.putString("channel_id", channelId); + NotificationChannel channel = new NotificationChannel(CHANNEL_ID, CHANNEL_ID, NotificationManager.IMPORTANCE_LOW); notificationManager.createNotificationChannel(channel); Notification notification = new Notification.Builder(mContext, CHANNEL_ID) .setContentTitle("Message failed to send.") .setSmallIcon(smallIconResId) + .addExtras(userInfoBundle) .build(); CustomPushNotification.clearNotification(mContext, notificationId, channelId);