Hello Glider
In my App, I have a chat component that consist of 1 Admin and 7 Agents . Currently everyone can chat with each other on the app, but I don’t want the agents to be able to chat with each other, what I need is the agent should be only able to chat with the Admin and not themselves. Although I have configured the chat to be private but I just can’t seem to stop the agent from chatting with each other. Please any help to this?
Can you post some screenshots showing how you’ve put this together? This should be very doable, but I’d need to see what we’re working with here to give out actual advice. It might just be a simple trick with the visibility or filter settings for your chat component.
Okay great, thanks very much! Can you show me what your chat interface looks like? I’m assuming you have a collection that shows your users, and everyone is showing up, instead of just the admin like you want. Can I see that, and also the ‘Options’ tab for the component, which will be on the right hand side of the builder when you select the component.
Okay, so if you want your various users to only be able to contact the Admin, but you want the Admin to be able to contact everyone, you can use that ‘Filter Data’ section of the builder. What I would do, not knowing too much about how your app is structured, is to add a column in your user profile called ‘chat permissions’ or something similar. In column, you could give each user a comma seperated list, containing the roles of other users they can chat to. So your Admin could have every role, and everyone else can only have Admin.
Then, in the Filter Data section, you could set it so you’re filtering to see only the rows where the role is included in this chat permissions tab in that user’s user profile row. I think this should work, though again it’s sometimes difficult to guess based on limited exposure to your app and how it works. Give it a shot and let me know what happens.
Please can you shed more light on what you mean by “comma seperated list”? is this a computed column action
I think you can approach this a bit differently.
- Add a tab that says “Admin chat” for each Agent, build on top of the Users table, filter the tab to the signed-in agent’s ID/email.
- Add a Chat component, make sure you save the agent’s ID in the table where you store chat records, so you can do a relation from the Users table to that Chat records table and keep an agent’s chat with admin “private”.
- On the admin’s side, add a Chat tab that shows all agent’s Users row. The action on the item would be “Show new screen > This item” (so that it doesn’t interfere with your Users details view for each agent, if you have that at all). Then in the new screen, add the Chat component, admins can chat with each agent on that new screen.