Reputation: 21
Could you please help me to setup below architecture?
I have created 3 different Feed Groups say timeline, timeline_images, timeline_videos
with type Flat
to filter activities based on activity types (blog, image, video). Adding activity to Feed Group based on activity type.
I couldn't be able to filter activities of only followers from specific Feed Group
On follow action, trying to set NEWS_FEEDS as below:
{'timeline':'timeline', 'timeline_aggregated':'timeline_aggregated',
'timeline_images': 'timeline_images', 'timeline_images_aggregated': 'timeline_images_aggregated',
'timeline_videos': 'timeline_videos', 'timeline_videos_aggregated': 'timeline_videos_aggregated'}
but then follower activity is shown in each Feed Group.
can anyone help me to set a filter like above?
Thanks in advance.!
Upvotes: 2
Views: 158
Reputation: 36
If I understood well, you are looking to "redistribute" an activity initially added in 'NEWS_FEEDS' feeds, into one of these 'timeline', 'timeline_video' or 'timeline_images' feeds depending on the activity type.
Instead of building follow-relationships between 'NEWS_FEEDS' and every timeline feed group, we suggest you post the activity to the right 'timeline' feed using the TO field when you initially add the activity to the 'NEWS_FEEDS' feed. Such as the following :
// Add the activity to Eric's feed and to Jessica's notification feed
const activity = {
actor: 'user:Eric',
message: "I post a video",
attachments: [video_reference],
type: 'video'
verb: 'tweet',
object: 'tweet:id',
to: ['timeline_video:1'],
};
const response = await user_feed_1.addActivity(activity)
Upvotes: 1