Hi everyone. Realtime event is not triggering when a document is updated. To give a bit of context, collection A and collection B exist such that there is a one to many relationship on an attribute on collection A. When a document is added on collection B, it's added automatically on collection A's field list.
Even though the document from collection A does update it's list with the new document from collection B, it doesn't trigger an event. When manually adding or removing the document from the list on collection A either through the SDK or through the console, the event does get triggered and a response is thrown in the code specified above. My permissions are set to "Any" checked for all read write perms.
This is the specific code that I'm using to subscribe to a document. When making a new message document on Message collection, the message gets added to a Room collection's messages list automatically because of the relationship - but the event does not trigger.
const unsubscribe = client.subscribe(
[`databases.${APPWRITE_DATABASE_ID}.collections.${APPWRITE_COMMUNITY_ROOM_COLLECTION_ID}.documents.${roomId}`],
(response) => {
console.log('[ChatContainer] New message event:', response);
}
);
When I'm adding or removing message documents from Room collection's manually either through the console or SDK, this event gets triggered.
Any help will be appreciated, thanks!
Yes, this is missing. There's a GitHub issue for this if you search for it
I recommend adding a π to the issue
thanks!
Recommended threads
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
- Different appwrite IDs are getting expos...
File_URL_FORMAT= https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID] I'm trying to access files in my web app...
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...