1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-14 10:52:41 +01:00
phorge-phorge/src/applications/feed
Joshua Spence fe98aa6839 Publish additional context to the Aphlict server.
Summary:
Ref T4324. As well as sending the key for the notification, also publish the notification type and a list of subscribers to the Aphlict server.

The idea here is that the Aphlict server passes anything within the `data` key to the clients, whereas other keys (such as `subscribers`) will be used by the server to determine where the notifications should be routed.

Note that these changes don't do anything useful, but are a prerequisite for further work on T4324.

Test Plan:
Sent myself test notifications at `/notification/status/`. Also inspected the Aphlict server debug output:

```
> sudo ./bin/aphlict --foreground
Starting server in foreground, ignoring pidfile...
Launching server:

    $ node '/usr/src/phabricator/support/aphlict/server/aphlict_server.js' --port='22280' --admin='22281' --host='localhost' --user='aphlict' --log='/var/log/aphlict.log'

[Thu Jun 05 2014 18:38:14 GMT+0000 (UTC)] Started Server (PID 15437)
[Thu Jun 05 2014 18:38:16 GMT+0000 (UTC)] <FlashPolicy> Policy Request From ::ffff:10.0.0.1
[Thu Jun 05 2014 18:38:16 GMT+0000 (UTC)] <Listener/1> Connected from ::ffff:10.0.0.1
[Thu Jun 05 2014 18:38:19 GMT+0000 (UTC)] notification: {"data":{"key":"6021516228036848559","type":"notification"},"subscribers":["PHID-USER-cb5af6p4oepy5tlgqypi"]}
[Thu Jun 05 2014 18:38:19 GMT+0000 (UTC)] <Listener/1> Wrote Message
```

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T4324

Differential Revision: https://secure.phabricator.com/D9396
2014-06-05 12:09:26 -07:00
..
application Remove "organization", "communication" and "miscellaneous" app groups 2014-05-29 15:25:26 -07:00
builder Fail feed story renders individually, instead of in aggregate 2014-03-10 18:22:24 -07:00
conduit Improve robustnesss of feed text rendering 2014-04-17 15:57:18 -07:00
config Add a note suggesting restarting daemons for feed.http-hooks 2014-03-08 06:37:16 -08:00
constants Move Project transaction storage to modern tables 2013-10-22 13:49:28 -07:00
controller Let feed panels render something meaningful-ish 2014-05-08 20:04:18 -07:00
management Extend all "ManagementWorkflow" classes from a base class 2013-12-27 13:15:40 -08:00
query Move audit rendering into SearchEngine 2014-05-08 20:04:18 -07:00
storage Apply lint rules to Phabricator 2013-02-19 13:33:10 -08:00
story Improve robustnesss of feed text rendering 2014-04-17 15:57:18 -07:00
worker Make task queue more robust against long-running tasks 2014-04-15 08:42:02 -07:00
PhabricatorFeedStoryPublisher.php Publish additional context to the Aphlict server. 2014-06-05 12:09:26 -07:00