Page MenuHomePhabricator

D10274.id.diff
No OneTemporary

D10274.id.diff

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;
}

File Metadata

Mime Type
text/plain
Expires
Oct 15 2024, 12:29 PM (4 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6711981
Default Alt Text
D10274.id.diff (1 KB)

Event Timeline