0

When a stream of type "notification" is created it has a default aggregation format of:

{{ verb.id }}_{{ time.strftime('%Y-%m-%d') }}

Maybe I am getting this wrong, but when trying to get the latest activities like so:

const user = client.feed('notifications', userId);
const activities = await user.get();

I don't need any aggregation. All I want is to display the X latest activities that happened. How can I set the aggregation format to null (no aggregation at all, the call should just return an array order by the time of each activity)

Yaron Levi
  • 12,535
  • 16
  • 69
  • 118

1 Answers1

0

You can disable aggregation by setting the aggregation format to

{{ id }}

If you dont need notification counts you could also consider using a flat feed.

Thierry
  • 3,225
  • 1
  • 26
  • 26
  • This is the first thing I tried, but isn't this a hacky workaround? The result is still aggregated but each group has only one activity. Isn't there an API call to get activities but not divided into groups (even not a group of 1)? – Yaron Levi Jan 17 '18 at 22:54
  • No unfortunately not. If you want a flat feed that's an option. At the moment there's no way to have both a notification feed without aggregation. You can kinda disable it by using {{ id }} but that's the only option. – Thierry Jan 18 '18 at 23:51
  • Ok... thanks! I really think this should be documented in Sentry docs, aorund "retriving activities". – Yaron Levi Jan 19 '18 at 10:34