From 4ba4b2976e71d3ba61148962eab35bedf50d140a Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 11 Jun 2024 07:42:43 +0000 Subject: pass the force argument to the xchan_photo daemon --- Zotlabs/Daemon/Xchan_photo.php | 9 ++++++--- Zotlabs/Lib/Activity.php | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Zotlabs/Daemon/Xchan_photo.php b/Zotlabs/Daemon/Xchan_photo.php index f90d1d726..662fc967c 100644 --- a/Zotlabs/Daemon/Xchan_photo.php +++ b/Zotlabs/Daemon/Xchan_photo.php @@ -8,14 +8,15 @@ class Xchan_photo { static public function run($argc, $argv) { - if ($argc != 3) { + if ($argc < 3) { return; } $url = hex2bin($argv[1]); $xchan = hex2bin($argv[2]); + $force = $argv[3]; - $photos = import_xchan_photo($url, $xchan); + $photos = import_xchan_photo($url, $xchan, false, $force); if ($photos) { $result = q("update xchan set xchan_photo_date = '%s', xchan_photo_l = '%s', xchan_photo_m = '%s', xchan_photo_s = '%s', xchan_photo_mimetype = '%s' where xchan_hash = '%s'", dbescdate(datetime_convert()), @@ -27,8 +28,10 @@ class Xchan_photo { ); if (! $result) { - logger("xchan update failed for $url"); + logger("xchan photo update failed for $url"); } } + + return; } } diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 5613e6bda..9178dac39 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -1875,7 +1875,7 @@ class Activity { } if ($icon) { - Master::Summon(['Xchan_photo', bin2hex($icon), bin2hex($url)]); + Master::Summon(['Xchan_photo', bin2hex($icon), bin2hex($url), $force]); } } -- cgit v1.2.3