Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

109
Views
How to get ownReactions for reactions and child reactions?

I would like to check if a user has already liked an activity/comment before, so I would like to get the likes of a user on an activity, or the likes of a user on a comment. However, this populates all reactions on an activity/comment instead of filtering only the user's reactions.

client.feed('user', 'Amy').get({ withReactionCounts: true, withOwnReactions: true })

I have tried the workaround commented on the Github project and tried playing around with both withOwnReactions and ownReactions based on this question but to no avail.

I currently have stream-js v7.2.11 installed.

Thanks!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

The parameters should be reactions.own and reactions.counts.

client.feed('user', 'Amy').get({reactions: {own: true, counts: true})

The other thing you need to do if you are making a server side call is to make sure you are calling it with a user token for the user you wish to see own reactions for, otherwise it will give you everything, as the client won't know who "own" refers to.

//Create the server side client
const serverClient = stream.connect(
  'abcde12345',
  'somereallylongandverysecretapikeythatyoushouldnotshareonstackoverflow',
  '123456');

//Create the user specific token
const userToken = serverClient.createUserToken('Amy');

//Create the user specific client
const userClient = stream.connect('abcde12345', userToken, '123456');

Now you should be able to get data from your feed with own_reactions populated only with data for the user you specified.

userClient.feed('user', 'Amy').get({reactions: {own: true, counts: true})

An additional gotcha is that if you create a new feed group other than the default ones Stream creates, than you will also need to email Stream's support team to ask them to change the permission to "Global Read" otherwise you'll get a 403 error. There doesn't seem to be any way to do it via their console. The user feed group is set to Global Read by default, but new feed groups are set to private. Their support was very helpful and fixed it up for me in less than an hour.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!