I have this document on the database:
I want to query the amount of messages documents where the ID of the user is not in the array of "read_by". I have the following code:
const q = query(messagesRef, where('read_by', 'not-in', [user.uid]))
const docs = await getDocs(q)
But this where is not working.. It still returns the 2 documents, even tho both of them have the ID of the user inside the array. The "user.uid" is correct, returns the correct id of the user.