I built this piece of code to add tags to my tag feed.
buildActivity = (model,obj) => { return { ...{ actor: `user:model.user`, verb: 'is', object: `model:${model.id}`, foreign_id: `model:${model.id}`, time: model.createdAt.toDate(), }, ...(obj ? obj : {}) }}addActivitiesToTagFeed = async (model,tags) => { const promises = [] for(let i=0;i<tags.length;i++){ const tag = tags[i] const activity = buildActivity(model,{target: `tag:${tag}`}) const feed = stream.feed('tag', tag) promises.push(feed.addActivity(activity)) } await Promise.all(promises)}
Which I limited to max 3 tags. I can have liketag:netflix
tag:films
tag:suspense
The problem is somehow the activity created by addActivity is the same to all tags. The same target, even the same activity id. It is breaking my 'tag_aggregated' that only follows one of those tags.
Ideas anyone how to fix it?