mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-26 23:40:57 +01:00
Make bot macro handler more graceful in the face of failure
Summary: Fixes T5883. The first time we hit an error we'll continue forward; we only bail after the second time. Instead, check for an error immediately Test Plan: HA HA HA DID NOT TEST HA HA HA HA Reviewers: btrahan, cburroughs Reviewed By: cburroughs Subscribers: epriestley Maniphest Tasks: T5883 Differential Revision: https://secure.phabricator.com/D10265
This commit is contained in:
parent
ae1a821b65
commit
40a4eeec77
1 changed files with 5 additions and 0 deletions
|
@ -68,6 +68,11 @@ final class PhabricatorBotMacroHandler extends PhabricatorBotHandler {
|
|||
$ascii = $this->macros[$macro]['ascii'];
|
||||
}
|
||||
|
||||
if ($ascii === false) {
|
||||
// If we failed to rasterize the macro, bail out.
|
||||
return;
|
||||
}
|
||||
|
||||
$target_name = $message->getTarget()->getName();
|
||||
foreach ($ascii as $line) {
|
||||
$this->replyTo($message, $line);
|
||||
|
|
Loading…
Reference in a new issue