Send a message to all users subscribed to a channel.
Webhook Form Variables:
Webhook post includes sender cookies.
Returns json:
[ success (boolean) , details (object) ]
Optional Webhook return details:
Example:
Client Calls:
connection.publish("channel-1", { title: "a message", body: "some text" });
Webhook Called With:
{ channel_name: "channel-1", payload: { title: "a message", body: "some text" } }
Webhook replies:
[ true, { } ]
And the following frame is published all subscribers to the channel ‘channel-1’:
{ channel_name: "channel-1", "payload": { title: "a message", body: "some text" } }
Send a private message to a user.
Webhook Form Variables:
Webhook post includes sender cookies.
Returns json:
[ success (boolean) , details (object) ]
Optional Webhook return details:
Example:
Client Calls:
connection.message("mcarter", { title: "a message", body: "some text" });
Webhook Called With:
{ sender: "some_user", recipient: "mcarter", payload: { title: "a message", body: "some text" } }
Webhook replies:
[ true, { override_payload: { title: "a new title", body: "some text" } } ]
And the following frame is published to the user ‘mcarter’:
{ sender: "some_user", recipient: "mcarter", "payload": { title: "a new title", body: "some text" } }