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:
David Fisher
2012-06-11 17:49:32 -07:00
committed by epriestley
parent 2bade93b76
commit f8f195b329
13 changed files with 235 additions and 138 deletions

View File

@@ -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);