diff --git a/src/applications/macro/conduit/MacroQueryConduitAPIMethod.php b/src/applications/macro/conduit/MacroQueryConduitAPIMethod.php --- a/src/applications/macro/conduit/MacroQueryConduitAPIMethod.php +++ b/src/applications/macro/conduit/MacroQueryConduitAPIMethod.php @@ -72,7 +72,8 @@ 'uri' => $file->getBestURI(), 'phid' => $macro->getPHID(), 'authorPHID' => $file->getAuthorPHID(), - 'dateCreated' => $file->getDateCreated(), + 'dateCreated' => $file->getDateCreated(), + 'filePHID' => $file->getPHID(), ); } diff --git a/src/infrastructure/daemon/bot/handler/PhabricatorBotMacroHandler.php b/src/infrastructure/daemon/bot/handler/PhabricatorBotMacroHandler.php --- a/src/infrastructure/daemon/bot/handler/PhabricatorBotMacroHandler.php +++ b/src/infrastructure/daemon/bot/handler/PhabricatorBotMacroHandler.php @@ -82,7 +82,17 @@ } public function rasterize($macro, $size, $aspect) { - $image = HTTPSFuture::loadContent($macro['uri']); + try { + $image = $this->getConduit()->callMethodSynchronous( + 'file.download', + array( + 'phid' => $macro['filePHID'], + )); + $image = base64_decode($image); + } catch (Exception $ex) { + return false; + } + if (!$image) { return false; }