From ab7db9944d9a67daf7667b2826bfd2902fdb816a Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 29 Jul 2019 04:35:13 +0000 Subject: [PATCH] ActivityPub: Support for incoming picture descriptions --- src/Protocol/ActivityPub/Processor.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Protocol/ActivityPub/Processor.php b/src/Protocol/ActivityPub/Processor.php index dadadecde..e85caa7e4 100644 --- a/src/Protocol/ActivityPub/Processor.php +++ b/src/Protocol/ActivityPub/Processor.php @@ -111,7 +111,11 @@ class Processor continue; } - $item['body'] .= "\n[img]" . $attach['url'] . '[/img]'; + if (empty($attach['name'])) { + $item['body'] .= "\n[img]" . $attach['url'] . '[/img]'; + } else { + $item['body'] .= "\n[img=" . $attach['url'] . ']' . $attach['name'] . '[/img]'; + } } else { if (!empty($item["attach"])) { $item["attach"] .= ',';