1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 12:00:55 +01:00

Minor, improve notification resiliance

Summary: The token transactions can publish empty transaction feed stories.
Stop them from doing that, and make notifications fail more quietly.

Auditors: btrahan
This commit is contained in:
epriestley 2014-04-21 16:28:59 -07:00
parent fcf5149b36
commit 3d12bbb17c
2 changed files with 11 additions and 1 deletions

View file

@ -129,7 +129,12 @@ final class PhabricatorNotificationBuilder {
$null_view = new AphrontNullView();
foreach ($stories as $story) {
try {
$view = $story->renderView();
} catch (Exception $ex) {
// TODO: Render a nice debuggable notice instead?
continue;
}
$null_view->appendChild($view->renderNotification($this->user));
}

View file

@ -2022,6 +2022,11 @@ abstract class PhabricatorApplicationTransactionEditor
array $mailed_phids) {
$xactions = mfilter($xactions, 'shouldHideForFeed', true);
if (!$xactions) {
return;
}
$related_phids = $this->getFeedRelatedPHIDs($object, $xactions);
$subscribed_phids = $this->getFeedNotifyPHIDs($object, $xactions);