0

When subscribing to a notification feed, is there any way to get the unseen and unread notification counts from the payload given by the getstream realtime subscription promise? If not, are there plans to implement this in the future?

I'm aware I can do a notificationFeed.get({limit: 0}) to retrieve that data, however, within our current system, it would be a lot more convenient if that count came with the subscription payload.

this.notificationFeed
    .subscribe((payload) => {
      console.log(payload)
    })
    .then(() => {
      //console.log('Full (Global Feed Flat): Connected to faye channel, waiting for realtime updates');
    }, (err) => {
      console.error('Full (Notification Feed): Could not establish faye connection', err);
    });

Currently, the payload doesn't include the unseen or unread counts when giving back data from a notification feed.

  • The payload for notification feeds should contain additional fields next to the `new` and `deleted`. Namely `unread` and `unseen` if these fields are not appearing in your payload something is wrong, please contact support with the id of the app for which you are having this issue. – Matthisk Aug 09 '16 at 23:47

1 Answers1

0

The realtime notification payload does not include unseen / unread counts for a feed. If you listen for changes on a feed and want to update counters you need to perform an API call and retrieve the counters from there.

Tommaso Barbugli
  • 11,781
  • 2
  • 42
  • 41