Page MenuHomePhabricator

D9396.id22413.diff
No OneTemporary

D9396.id22413.diff

diff --git a/src/applications/feed/PhabricatorFeedStoryPublisher.php b/src/applications/feed/PhabricatorFeedStoryPublisher.php
--- a/src/applications/feed/PhabricatorFeedStoryPublisher.php
+++ b/src/applications/feed/PhabricatorFeedStoryPublisher.php
@@ -175,9 +175,42 @@
}
private function sendNotification($chrono_key) {
+ switch ($this->storyType) {
+ case 'PhabricatorNotificationAdHocFeedStory':
+ $type = 'adhoc';
+ break;
+ case 'PhabricatorFeedStoryAudit':
+ $type = 'audit';
+ break;
+ case 'PhabricatorFeedStoryCommit':
+ $type = 'commit';
+ break;
+ case 'PhabricatorFeedStoryDifferential':
+ case 'PhabricatorFeedStoryDifferentialAggregate':
+ $type = 'differential';
+ break;
+ case 'PhabricatorFeedStoryManiphestAggregate':
+ $type = 'maniphest';
+ break;
+ case 'PhabricatorFeedStoryPhriction':
+ $type = 'phriction';
+ break;
+ case 'PhabricatorTokenGivenFeedStory':
+ $type = 'token';
+ break;
+ case 'PhabricatorApplicationTransactionFeedStory':
+ $type = 'transaction';
+ break;
+ default:
+ return;
+ }
$data = array(
- 'key' => (string)$chrono_key,
+ 'data' => array(
+ 'key' => (string)$chrono_key,
+ 'type' => $type,
+ ),
+ 'subscribers' => $this->subscribedPHIDs,
);
try {
diff --git a/src/applications/notification/client/PhabricatorNotificationClient.php b/src/applications/notification/client/PhabricatorNotificationClient.php
--- a/src/applications/notification/client/PhabricatorNotificationClient.php
+++ b/src/applications/notification/client/PhabricatorNotificationClient.php
@@ -2,7 +2,7 @@
final class PhabricatorNotificationClient {
- const EXPECT_VERSION = 4;
+ const EXPECT_VERSION = 5;
public static function getServerStatus() {
$uri = PhabricatorEnv::getEnvConfig('notification.server-uri');
diff --git a/support/aphlict/server/aphlict_server.js b/support/aphlict/server/aphlict_server.js
--- a/support/aphlict/server/aphlict_server.js
+++ b/support/aphlict/server/aphlict_server.js
@@ -120,9 +120,9 @@
request.on('end', function () {
++messages_in;
- var data = JSON.parse(body);
- debug.log('notification: ' + JSON.stringify(data));
- broadcast(data);
+ var msg = JSON.parse(body);
+ debug.log('notification: ' + JSON.stringify(msg));
+ broadcast(msg.data);
response.end();
});
} else if (request.url == '/status/') {
@@ -139,7 +139,7 @@
'messages.in': messages_in,
'messages.out': messages_out,
'log': config.log,
- 'version': 4
+ 'version': 5
};
response.write(JSON.stringify(status));

File Metadata

Mime Type
text/plain
Expires
Sun, Oct 27, 10:42 AM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6752235
Default Alt Text
D9396.id22413.diff (2 KB)

Event Timeline