So I’m trying to make a minor modification to the chat app template.
In the app, when I try to create a new conversation by clicking on ‘+’ icon, I’m directed to the ‘Start conversation’ Screen. I see a list of all users - including myself - so I filter the list by removing the logged in users email.
Trouble is the list also populates all users with whom you have already created a ‘conversation’. Also, when you click on a user with whom you have a pre-existing conversation, a set of actions get triggered (which are visible on the group 19 component) which create a brand new conversation.
So you end up with multiple ‘conversations’ between the same two set of users. Need to avoid this.
Ideally I would want
- to hide the list of users with whom you have an existing conversation
- if that user is selected, to redirect using conditional actions to a screen which shows existing conversation & not create a new one
I’m going to use the schema notations straight from the template app for simplicity.
The filter for both (I think) is to not display any user who is a part of logged in user-> conversations (member)s -> user … using any property like current user’s email, username etc to check. Rather display all current users as long as current users-> conversation (members)s-> all does not contain logged in user email.
Trouble is I can’t find this filter at all in the ‘list’. I also cant find this filter in the conditional action to redirect to a different screen.
Is there a way to implement the filters correctly to accomplish what I want - either in list of users or in screen link conditional actions? I don’t think controlling list visibility comes in to play, but do enlighten if I’m wrong.