1
0
Fork 0
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:
epriestley 2014-08-14 12:13:43 -07:00
parent ae1a821b65
commit 40a4eeec77

View file

@ -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);