So what I'm trying to do is a chat app, but the problem is I don't know how to make a connection between two users. What I've done is that there's a users collection, inside that collection, there are some users that got a collection of friends that a user can add, so I managed to let the user enter the email of a friend and lookup for it in the users' collection, but I couldn't make a connection between the user and its friend to chat, I was thinking of making a chat collection for each user but I think this won't be efficient and still can't share the same collection between two users, any ideas how to structure it properly?
Thanks in advance for any help you are able to provide.