GetStream Multiple Feed Instances of same group per user? - getstream-io

Is it possible to create multiple feeds of a feed group s.t. users can join multiple feeds of the same feed group? Specifically, we would like to create a game feed view all players in the game can see updates and post reactions/comments. Players can be part of multiple games and each game feed should be separate from any other. Is this possible using getstream and what would be the best approach?
From reading the documentation, it seems that one cannot use API to dynamically create feed groups. However, I think it should be possible to create multiple feeds of the same feed group but in their documentation (https://getstream.github.io/react-native-activity-feed/#flatfeed) it seems to suggest that we just pass the feed group and user id, which makes me think we can only create a feed per feed group per user?

Definitely, it's possible.
For example, game:game-id and users can have their own feeds too user:user-id.

Related

How do you aggregate social activity using Postgres?

In this app I have users, posts, and groups. Users post to groups, of which many users can be a part of.
I'm trying to aggregate all this into a feed where if a multiple groups you're part of have a post made to them (in consecutive order, with no activity in between) it groups it into 1. So you'd see "Posted in 5 groups" instead of the post 5 times in your activity feed.
Example of the schema & desired result
How would you do this with Postgres queries? Imagine thousands of posts in various orders, and you only want the newsfeed to show related activities that are right next to each other
Also I'm using node js for backend if there's any libraries to do that. Thanks!

What is the best way to add a user feed to his own timeline?

I would like to build an Instagram-like social app, where on the user timeline, you also have his own activities displayed. My first thought was to follow his own user feed but from what I read in this blog post: https://getstream.io/blog/best-practices-for-instagram-style-feeds/
We recommend blocking a user's timeline feed from following their own user feed
Can someone explain why it would be a bad practice ? How could I implement my use case if that is the case ?
Thanks !
Looking at this myself. I think the logic they describe is incorrect. The full statement in context make a little more sense in terms of what I think they mean.
We recommend blocking a user's timeline feed from following their own
user feed, and also blocking users from seeing/following another
user's timeline feed.
The first part of the sentence I believe is backwards. What I think it should says is that the "user" feed should be blocked from following the "timeline" feed. The user feed should just contain actions that the user performed, so it shouldn't contain data from the timeline feed. But if you want the user's activities to appear in the timeline feed than it seems to me that you should definetly make the user's timeline feed follow thier user feed, and prevent the user's timeline feed from unfollowing their own user feed.
The second part that says you should block users from following another user's timeline feed. I believe this is correct because the timeline feed is a series of peronalised items for an individual user. It doesn't make sense to follow another user's timeline feed.
This is how I have implemented my logic and it seems to be working so far, but if I come across any issues with it I'll come back here and update this answer.

Is there a way to combine multiple powerbi api requests in to a single restapi call? Something like a batch request to get a collective response?

I'm trying to reduce the api calls to fetch data out of powerbi rest api. when i call endpoint like /Groups, The response is straight forward in a single api call, I get all the groups. in order to get datasets,dashboards and reports i'll have to pass every group id to endpoints of reports,datasets.,etc.
eg.
GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets
Is there a way to combine these requests, such a way that i send multiple group ids in a single api call to get all the datasets from their respective groups?
I have not found a way to combine it all together to make a single batch api call.
However, I tried a different endpoint found from MSDocs to avoid input of group id.
GET https://api.powerbi.com/v1.0/myorg/datasets
But the problem with this is, the response wont have information of which group the dataset belongs to. without group information,the retrieved data wont be useful for me.
https://learn.microsoft.com/en-us/rest/api/power-bi/datasets
You must use the admin part of the API. To get a list of all groups in your organization, call GetGroupsAsAdmin (you can filter what you want to get too). Similarly, call GetDatasetsAsAdmin to get list of datasets. Look at their webUrl property to find their group.
https://api.powerbi.com/v1.0/myorg/datasets wont return all datasets (or datasets from multiple groups) but will give you the datasets located in your own My workspace.

Track multiple context for the same Bot

We have a bot that will be used by different customers and depending on their database, sector of activity we're gonna have different answers from the bot and inputs from users. Intents etc will be the same for now we don't plan to make a custom bot for each customer.
What would be the best way to separate data per customer within Chatbase?
I'm not sure if we should use
A new API key for each customer (Do we have a limitation then?)
Differentiate them by the platform filter (seems to not be appropriated)
Differentiate them by the version filter (same it would feel a bit weird to me)
Using Custom Event, not sure how though
Example, in Dialogflow we pass the customer name/id as a context parameter.
Thank you for your question. You listed the two workarounds I would suggest, I will detail the pros/cons:
New API Key for each customer: Could become unwieldy to have to change bots everytime you want to look at a different users' metrics. You should also create a general api (bot) where you send all messages in order to get the aggregate metrics. This would mean making two api calls per message.
Differentiate by version filter: This would be the preferred method, however it could lengthen load times for your reports as your number of users grows. The advantage would be that all of your metrics are in one place, and they will be aggregated while only having to send one api call per message.

How to remove activity from multiple feeds?

I'm using notification feeds where users get a notification when other users add replies into a forum thread they are part of.
I'd like to know how I can remove activities from all feeds when the reply is deleted?
I can't seem to find any information about that. The examples show how I can remove an activity from one users feed. But I don't necessarily know all the users that might have the activity on their notifications feed.
Or is there a way to get a list of notification feeds that contain activities with a foreign id?
When you delete an activity from a feed, a delete is propagated to every feed that received that activity via follow relationship or to field. In your example, if you delete the activity from the "origin" feed you should be OK. If that's not the case you should probably expand your question with more detail.
Since you mentioned it: deletes by foreign_id allow you to delete all activities from one feed that share the same foreign_id value. For example: say that you have many activities in a feed with foreign_id "post:42" and you want to delete them all in once, you can perform a delete on foreign_id="post:42".

Resources