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