So here is my Firebase structures look like:
firebase-url/users/
/user-id/
posts
profile
relations
/user-id/
posts
profile
relations
every user has his own posts, let's say there are 2 users. user A and B. if A has a relationship with B, then both could see each other posts and listen for the updates. the situation is simple when A listen to B posts, but A may has n relations with other users like B,C,D ..etc.
I checked other threads like this and this but there is no a clear simple solution for my problem, for example the first thread was about listening to constant number of childs, which is not a big problem.
how could A listen to multiple user posts updates? specially when users number is big and more than 10 or 20.