1

Short description: I get push notification from twilio chat. But in my app I use 4 different chats (channels). So when I get field "bage" from notification it just show count of chats with new messages, but not amount of messages.

How can I get the sum of unread messages from all chats?


More info:

  • I use react-native 0.61.2 but I write native code too;
  • During the work I have used this tutorial TwilioChatReactNative;
  • For indicate unreaded messages I use Message Consumption Horizon;
  • The way of connection to chat (only react part) the close to this Connect to chat;
  • In theory I can get set bage himself, but for me this function don't work in background;

    PushNotificationIOS.setApplicationIconBadgeNumber

  • Also I have tried to use this library react-native-notification but it didn't help too.
  • I subscribe to pushNotification with this method

    client.setPushRegistrationId('apn', token);

  • When I use twilio notify and set "bage" by hand all work good, but notification from chat twilio do by himself.

Summary: I need one decision from this list (or something else, I open for offers):

  • Say twilio send me sum of unread messages from all chats;
  • Way how update "bage" from background;
  • New way of subscribing to channels to get the sum of messages in "bage".

Thanks to everyone who will respond

Owl
  • 11
  • 2

1 Answers1

0

Thank you for your questions and for using Twilio Programmable Chat! I have opened this issue in the repo found at https://github.com/twilio/TwilioChatJsReactNative/issues/40 so that folks using the repo can see the answers there. :-)