How to make posts unique/avoid duplicate posts?

Hello everybody,
One of our customers runs a football community. Posts about a player should be published in the player feed and also be added to their team’s feed.

Our challenges:

  1. Users should only see the post once in their global feed even if they follow the player and the team.

  2. Reactions and comments to the post should be the same in the player and in the team feeds.

  3. Create the post in a single command by providing multiple target ids.

Does anything like this exist?
Does anybody have experience with workarounds to make some of the challenges possible? E.g., using a unique ID for every post as metadata.

Any advice is greatly appreciated.

Hi @devdieter By design our post ID is unique. So for your use case, there are 3 types of feeds: global feed, team feed(community) and player feed(user), correct?

  1. If a player post in a team feed, should that post be visible on that player feed as well?
  2. Reactions and comments could be managed by rendering on frontend
  3. Could you please share more detail on this, what would you like to achieve by create a post in a single command by providing multiple target ids?

Thanks for getting back to me. Happy to provide more detail:

The social media head of a soccer club manages multiple feeds. Among others, they have a team user feed and a user feed for each player.

The soccer team celebrates a victory. They want to post a 1:0 win against the neighboring club. This happy event should appear both in the team user feed and in the user feed of the player who scored the goal.

Of course, they could publish two separate posts.
However, in this case any subscriber to both the team feed and the player feed would see the post twice (challenge 1).
Also, any updates, comments or likes of the posts would be separate for each post (challenge 2).
Finally, it is duplicate work to create the posts (challenge 3).

I hope this helps clearing things up.

@devdieter from 3 challenges that you mentioned, they can be achieved. Just to double confirm, all posts on player feed and team feed will be posted by an admin/manager or the player themselves?

Sounds great, looking forward to the solution!

Yes, all posts will be posted by admin/manager.

@devdieter Please see our official docs here on how to implement social: Social - Amity Docs

and to post by admin/manager, you will have to implement a loop with this api: Amity API

Note: In term of rate limit, we recommend to create 5 posts/sec

Ok, I see. Based on your documentation I do not see a solution for challenges 1 or 2. That’s why I asked in this forum.

Challenge 3 was a mere suggestion to add support for multiple targetIds.

Thanks for your quick responses anyway.

@devdieter Apologies, we might misunderstood your use case. For the solution, you can create a post that exists in multiple feeds and having the same reactions and comments by adding the originalPostId field in the new post’s metadata field. Once the frontend query the post, add a logic to check if this field exists. If it does, you can add a logic to extract the “originalPostId” field to get the ID of the original post and query that post to be rendered on the frontend accordingly.