Skip to content
Back

Attribute not found in schema: `users` (for Messages)

  • 0
  • Flutter
  • Messaging
  • Cloud
d_honig
10 Nov, 2024, 12:02

I want to make sure that a message hasn't already been set for a specific user. So I tried to listMessages with the following query: Query.contains("users", userId) I get the above error.
Why is this? I can create the Message using the users property with no issues. If this isn't possible, how can I check this? I can get the target from the user and query with the target, but this doesn't work either, same error. When listing the messages, they have both users and targets. Thanks

TL;DR
Issue: Attribute `users` not found in schema for listing messages based on `userId`. Potential Solution: Utilize the existing `target` property to query for messages associated with a specific user, as the `users` property seems to be unsupported in this context.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more