Hi All,
I am in desperate need of help here; my app has a simple chat built in and I am having the following problem.
I am trying to access the chat between two different people (authenticated user & another user) from the "another user" profile. I am doing so by doing a single doc query from the Chat collection and filtering it by user_a and user_b. See picture below:
User_a in this case is the authenticated user and user_b is the "another user", however, this works only if the Authenticated user is the one who created the chat document, if user_b logs on and tries to access that same chat via the other user profile, he will not be able to do so because the Authenticated User is now user_b. That results in a new chat being created by the other person and I am now left with two different chats between the same people. Does anyone have any recommendation on how to fix that? How can I call the same doc using two different users?
Thank you for the help in advance!
Bernardo