Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13958021
D10274.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10274.id.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D10274: Use `file.download` to retrieve macro images in the IRC macro bot
Attached
Detach File
Event Timeline
Log In to Comment