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
- Problem with Google Workspace at DNS Rec...
Hello, I bought a domain at Namecheap, and Google Workspace used to work there, but now that I switched from Custom DNS to Appwrite's nameservers, it doesn't w...
- change role of a team member in Appwrite
It's not possible to add/change roles of a team meber in Appwrite Frontend. When you click on a member of a team you get forwarded to the configuration page of ...
- Session not found. Please run appwrite l...
I have encounter an issue with appwrite CLI They asking for a login session but in the doc, itβs mention that only setup client with endpoint / api key is enou...