Hello, I am trying to build a friend request system. The tricky part is that certain user info is available only to friends.
Currently I have multiple objects (with mostly duplicated data):
- User - accessed only by currently logged in user (partition: user=user.id)
- PublicUser - accessed by all users (partition: user=all-the-users)
- FriendUser - accessed only by friends (partition: I have no clue how to properly partition it)
I also have an object(collection) Friendship. There I store:
Is there a proper and more scalable way of building this? I want to avoid having an array of friend ids under the main user object.
Thank you all!