Replies: 3 comments 4 replies
-
The events settings array is for custom emits (aside from built in events like connection) done on the server. You need to emit the others yourself. Only the The comment type should emit with the settings outlined above, looks like your syntax for listening on the client side incorrect. It should be If you are still not receiving the events then make sure the jwt role has permissions set correctly in role settings for that content type (e.g. if you are listening for comment create, then the role needs the create permission checked for the comment content type). Hope that clears things up. |
Beta Was this translation helpful? Give feedback.
-
It turns out, i bluntly copied the ts code, without actually realising the data was a variable i still had to declare ofc.. it didn't produce any errors so didn't realise it. The Thanks for your response! |
Beta Was this translation helpful? Give feedback.
-
It works good without jwt token. I also tried ignore "Bearer", but also rejected. Am I missing anything? ========================================== console.log('JWT_TOKEN', JWT_TOKEN.value) socket.on('profile:update', (data) => {
|
Beta Was this translation helpful? Give feedback.
-
Client code:
Server code:
In frontend, websockets connect properly. I get the message 'connected' when it loads.
However, in the backend, I get nothing.
When I create a new comment in the admin, nothing happens either.
What am I missing here? Thanks!
Beta Was this translation helpful? Give feedback.
All reactions