CamoOriginal post
Rank 3: Container
This should log the response, right? Well it doesn't.
I see the connection in the network tab, it's alive and healthy.
Any ideas?
JavaScript
function callback(response){ return console.log(response) }
const unscribe = appwrite.client.subscribe('dashboard', callback);
beforeNavigate(to => { unscribe() })```Summary
Developers were experiencing an issue where the callback function for a Realtime Subscription was not logging the response. The solution was to ensure that the correct collection name was used in the subscription function. The correct code should be:
```js
appwrite.client.subscribe('databases.*.collections.dashboard', callback);
```
The developer also confirmed that everything else was set up correctly, and there was a successful connection. After some debugging, they realized that they were mistakenly using the wrong collection name in the subscription function.