File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -48,5 +48,30 @@ the channels.
4848
4949Each channel can have its own handler: just create it in the handlers directory: example: if a ``$mychan `` is declared in
5050settings it is possible to create a ``$mychan.js `` file in the handlers directory to manage the handling logics
51- just for that channel
51+ just for that channel.
5252
53+ Example handler:
54+
55+ .. highlight :: javascript
56+
57+ ::
58+
59+ if (event_class === "someclass") {
60+ console.log(message)
61+ }
62+
63+ Available variables:
64+
65+ ``event_class `` : class of the event
66+
67+ ``channel `` : name of the channel
68+
69+ ``message `` : text message
70+
71+ ``data `` : json payload
72+
73+ ``site `` : site slug
74+
75+ ``uid `` : unique id of the message
76+
77+ ``timestamp `` : date timestamp
You can’t perform that action at this time.
0 commit comments