Make Notifications Realtime
Summary: Adds the node.js Aphlict server, the flash Aphlict client, and some supporting javascript. Built on top of - and requires - D2703 (which is still in progress). Will likely work with no modification on top of the final version, though. The node server is currently run with sudo node support/aphlict/server/aphlict_server.js Test Plan: tested locally Reviewers: epriestley Reviewed By: epriestley CC: allenjohnashton, keebuhm, aran, Korvin Differential Revision: https://secure.phabricator.com/D2704
This commit is contained in:
@@ -33,10 +33,18 @@ final class PhabricatorNotificationPanelController
|
||||
$builder = new PhabricatorNotificationBuilder($stories);
|
||||
$notifications_view = $builder->buildView();
|
||||
|
||||
$num_unconsumed = 0;
|
||||
foreach ($stories as $story) {
|
||||
if (!$story->getHasViewed()) {
|
||||
$num_unconsumed++;
|
||||
}
|
||||
}
|
||||
|
||||
$json = array(
|
||||
"content" => $stories ?
|
||||
$notifications_view->render() :
|
||||
"<b>You currently have no notifications<b>",
|
||||
"number" => $num_unconsumed,
|
||||
);
|
||||
|
||||
return id(new AphrontAjaxResponse())->setContent($json);
|
||||
|
||||
Reference in New Issue
Block a user