GetStream / react-native-activity-feed

Official React Native SDK for Activity Feeds
https://getstream.io/
200 stars 88 forks source link

User group feed and instantiating feeds with feed tokens #238

Closed haggalin closed 3 years ago

haggalin commented 3 years ago

Hi

Reading the documentation here:

https://getstream.io/activity-feeds/docs/node/adding_activities/?language=javascript

You can instantiate the feed with a server-side generated feed token. But I can't seem to find a way to use that type token in this package.

Our use case is to have groups of users which could read and write to the group's feed (identified with the team ID), and it seemed like feed tokens was the way to go, or am I missing something?

MartinCupela commented 3 years ago

Hi @haggalin ,

yes, you are right. Components in this packages do not forward token parameter to client.feed(..., token) calls. They use the user's token provided to the StreamClient instance on its initialization.

You can allow your users to read from other users' feeds by following them. You can also use targeting:

https://getstream.io/activity-feeds/docs/node/targeting/?language=javascript

MartinCupela commented 3 years ago

Hi @haggalin can we close this issue?

haggalin commented 3 years ago

Hi yes, I've been chatting with support about this as well and it seems that the use of scoped tokens is not recommended.

Our use case was to have user group feeds which were private for the group members. So for anyone who stumbles on this issue then the recommendation from Stream is described here.