diff --git a/src/applications/feed/PhabricatorFeedStoryPublisher.php b/src/applications/feed/PhabricatorFeedStoryPublisher.php index ee0950f36a..9448a4f616 100644 --- a/src/applications/feed/PhabricatorFeedStoryPublisher.php +++ b/src/applications/feed/PhabricatorFeedStoryPublisher.php @@ -161,16 +161,16 @@ final class PhabricatorFeedStoryPublisher { } private function sendNotification($chrono_key) { - $server_uri = PhabricatorEnv::getEnvConfig('notification.server-uri'); $data = array( 'key' => (string)$chrono_key, ); - id(new HTTPSFuture($server_uri, $data)) - ->setMethod('POST') - ->setTimeout(1) - ->resolve(); + try { + PhabricatorNotificationClient::postMessage($data); + } catch (Exception $ex) { + // Ignore, these are not critical. + } } /** diff --git a/src/applications/notification/client/PhabricatorNotificationClient.php b/src/applications/notification/client/PhabricatorNotificationClient.php index beb1a7cffe..f9f78274c2 100644 --- a/src/applications/notification/client/PhabricatorNotificationClient.php +++ b/src/applications/notification/client/PhabricatorNotificationClient.php @@ -25,4 +25,13 @@ final class PhabricatorNotificationClient { return $status; } + public static function postMessage(array $data) { + $server_uri = PhabricatorEnv::getEnvConfig('notification.server-uri'); + + id(new HTTPSFuture($server_uri, $data)) + ->setMethod('POST') + ->setTimeout(1) + ->resolvex(); + } + }