mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 03:50:54 +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:
parent
fcf5149b36
commit
3d12bbb17c
2 changed files with 11 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue