Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/js/application/aphlict/behavior-aphlict-listen.js
| Show All 10 Lines | |||||
| * phabricator-notification | * phabricator-notification | ||||
| */ | */ | ||||
| JX.behavior('aphlict-listen', function(config) { | JX.behavior('aphlict-listen', function(config) { | ||||
| var showing_reload = false; | var showing_reload = false; | ||||
| function onready() { | function onready() { | ||||
| var client = new JX.Aphlict(config.id, config.server, config.port) | var client = new JX.Aphlict( | ||||
| config.id, | |||||
| config.server, | |||||
| config.port, | |||||
| config.subscriptions); | |||||
joshuaspence: As above... | |||||
| client | |||||
| .setHandler(onaphlictmessage) | .setHandler(onaphlictmessage) | ||||
| .start(); | .start(); | ||||
| } | } | ||||
| // Respond to a notification from the Aphlict notification server. We send | // Respond to a notification from the Aphlict notification server. We send | ||||
| // a request to Phabricator to get notification details. | // a request to Phabricator to get notification details. | ||||
| function onaphlictmessage(type, message) { | function onaphlictmessage(type, message) { | ||||
| switch (type) { | switch (type) { | ||||
| ▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines | |||||
As above...