im trying to subscribe only to user related documents. Document security is enabled. But I get any updates.
I recive also documents from other user
nextjs:
const { client } = getClientSideServices();
return client.subscribe(
`databases.${appwriteConfig.databaseId}.collections.${collectionId}.documents`,
(response) => {
console.log('Events get for :', collectionId, response);
callback(response);
}
);
and
export function getClientSideServices() {
const client = new Client()
.setEndpoint(appwriteConfig.endpoint)
.setProject(appwriteConfig.projectId);
const sessionCookie = getCookie('session');
if (sessionCookie) {
console.log('Session-Cookie found, last Session:', sessionCookie.substring(0, 10) + '...');
client.setSession(sessionCookie);
} else {
console.warn('No Session-Cookie found!');
}
return {
account: new Account(client),
databases: new Databases(client),
storage: new Storage(client),
teams: new Teams(client),
client,
};
}
permissions on collection settings:
permissions on document settings:
I followed also this tutorial. It doesnt helped
I checked also dev tools on browser. the user is null. Is that the reason? If yes, how can we fix it?
Recommended threads
- Authentication on custom Websocket Serve...
Hi, I want to use a custom Websocket Server (using Bun) for my application. However I cant really figure out authentication on custom servers. Session cookies ...
- Realtime: Listener not triggered on upda...
I self host appwrite 1.8.1. The genereal functionallity works fine. But my realtime subscription isn't updating. I see "Received heartbeat response from realtim...
- Realtime for files() works almost well, ...
I have been trying to make use of realtime, today (14.03.26) I have pulled all the latest versions of docker images, and sdk available. Whats working: - Conn...