Receive notifications content (client side hook)
-
Hello, I want to write a client-side code, which is received when a new message is pushed to the notifications panel:
And getting the content of the message (title and content) [I want to add an app.alert that will show the content of the message even without opening the notifications pane].
The appropriate hook is probably "action: notification.updateCount
", but I printed the data and event on the console and checked the output, and did not find how I could get the content and title of the message.
@baris I wrote here and not on github, as you said
-
@baris Thanks, it's great!
Although posting about a new post as posts does not work well, but not terrible ...
Maybe there is a list of socket events?
I wish I could get as much information as possible on my own, without asking here over and over again ... -
Now I see that you can just use the "
bodyShort
" flag and it works.
But it will still be interesting to know how to turn user-id into a username ... -