Conditions with 3 operators

Hello everyone,
I’m trying to make a chat system. I used a repeating group to put the content of the different messages, and a advanced filter in my search option, for I want the message to appear when :

  • the sender is current user AND the recipient is current page user
  • the sender is current page user AND the recipient is current user

Is there any way to do it with Bubble ?

By the way, here is my filter :

Suggested dB model:

Users (list of users)
Inactive? (y/n)
Last message (message)

Content (text)
Thread (thread)
Viewed by (list of users)

Well, first of all, thank you for your reply !

I just tried with this db model, but it didn’t work as intended (I, obviously, made some changes with the research) The thing is that it works one way, the sender can see the message, but the recipient cannot, which is somewhat annoying :sweat_smile: