I followed the docs but I am still very confused as to how it works. It states that the default channel a notification broadcasts to is Noticed::NotificationChannel. Where is this channel?
When I tried it out, the logs showed that the Job was performed and it broadcasted to the channel but nothing shows up on the console. I tried to use config.message = :to_websocket, inside the websocket method I wrote { alert: “#{notification.record.user} commented #{notification.record.body}” }. Nothing. I tried to create my own Notification channel and inherit from Noticed::NotificationChannel, then in the javascript file, tried to log data.alert in the console. Nothing. Can somebody who has got it working show me what they did and explain how it works?
user24646947 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.