stream-js icon indicating copy to clipboard operation
stream-js copied to clipboard

How to limit comment when get feed and filter reaction

Open toannv1803 opened this issue 4 years ago • 0 comments

  1. I use this code to get feed
timeline.get({ 
  ranking: '...',
  enrich: true, 
  limit: 3,
  recentReactionsLimit: 2
  ownReactions: true, 
  withOwnReactions: true, 
  withOwnChildren: true, 
  withReactionCounts: true, 
  withRecentReactions: true, 
})

I receive 3 activities, in every activity has 2 comments lv1 but unlimited comment lv2 in comment lv1 return in the result. Getstream support create reaction lv 0, 1, 2. When I get feed how to I limit reaction lv 1, 2

  1. When I filter reaction, latest_reactions include all reaction child, I can't limit data in latest_reactions. This is my code
client.reactions.filter({
  activity_id: activityId,
  kind: "comment",
  limit: 1
});
  1. When I load more comments, I use filter reaction, but I can't get own_children of the current user.

Thank you.

toannv1803 avatar Aug 28 '21 09:08 toannv1803