mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +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();
|
$null_view = new AphrontNullView();
|
||||||
|
|
||||||
foreach ($stories as $story) {
|
foreach ($stories as $story) {
|
||||||
|
try {
|
||||||
$view = $story->renderView();
|
$view = $story->renderView();
|
||||||
|
} catch (Exception $ex) {
|
||||||
|
// TODO: Render a nice debuggable notice instead?
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$null_view->appendChild($view->renderNotification($this->user));
|
$null_view->appendChild($view->renderNotification($this->user));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2022,6 +2022,11 @@ abstract class PhabricatorApplicationTransactionEditor
|
||||||
array $mailed_phids) {
|
array $mailed_phids) {
|
||||||
|
|
||||||
$xactions = mfilter($xactions, 'shouldHideForFeed', true);
|
$xactions = mfilter($xactions, 'shouldHideForFeed', true);
|
||||||
|
|
||||||
|
if (!$xactions) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$related_phids = $this->getFeedRelatedPHIDs($object, $xactions);
|
$related_phids = $this->getFeedRelatedPHIDs($object, $xactions);
|
||||||
$subscribed_phids = $this->getFeedNotifyPHIDs($object, $xactions);
|
$subscribed_phids = $this->getFeedNotifyPHIDs($object, $xactions);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue