
i'm working on a chat functionality. so in all chat applications, we see a chats list on the left that shows with whom you're chatting or have chatted with. either you're the receiver or the sender, it shows the chat item. so to get a list like this, we need to pass a query where the sender_id
or the recipient_id
is equal to the current user id.
we can do an OR
operation for a value of any attribute by passing an array in the 2nd argument of the equal
method. but what i need here is something like an OR
operation for the name of the attributes and i can't find a way to do that. am i missing something?

my goal above could be achieved by the below SQL
SELECT * FROM chats
WHERE (sender = {currentUser.$id} OR recipient = {currentUser.$id}) ORDER BY timestamp
in case it helps

This is not supported at the moment. See https://github.com/appwrite/appwrite/issues/2740
Recommended threads
- ❗[Help] Function stuck in "waiting" stat...
Hi Appwrite team 👋 I'm trying to contribute to Appwrite and followed the official setup instructions from the CONTRIBUTING.md guide to run the platform locall...
- Help with 409 Error on Relationship Setu...
I ran into a 409 document_already_exists issue. with AppWrite so I tried to debug. Here's what I've set up: Collection A has 3 attributes and a two-way 1-to-m...
- Database Double Requesting Error.
I am getting error for creating new document in an collection with new ID.unique() then too getting error of existing document. When button is pressed one docum...
