I am building my first chat functionality and followed pretty much this blogpost with the suggested database structure
Data type: Message
- Message content - Text
- Messages chat - Chat (Not sure what this is even needed for)
Data type: Chat
- Chat Users - List of Users
- Chat Messages - List of Messages
This is the logic for creating new chats:
It works fine to create new chats and the according messages, but I only want to have one active chat between any two participants, i.e. when pushing the icon/the entry on a list, instead of creating a new chat between the current user & the parent’s group user and pushing this data to the next page, is there a way to create a workflow to 1) check if there is an existing chat between the current and the parent group’s users and, if the answer is yes, 2) send the data of the existing chat to the next page?
I have tried to work with Do a Search and multiple conditions to filter for this case, but that did not work, because both conditions are checked for separately.
Not sure what to do here.