From 4366737eb826fa34b9537bd37ade08a5c97c227c Mon Sep 17 00:00:00 2001 From: Hank Grabowski Date: Sat, 18 Mar 2023 23:05:49 -0400 Subject: [PATCH] Fix posting/editing empty text image posts through Mastodon API --- src/Model/Item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 93ad4fd8f0..12184a3a55 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -589,7 +589,7 @@ class Item public static function isValid(array $item): bool { // When there is no content then we don't post it - if (($item['body'] . $item['title'] == '') && empty($item['quote-uri-id']) && (empty($item['uri-id']) || !Post\Media::existsByURIId($item['uri-id']))) { + if (($item['body'] . $item['title'] == '') && empty($item['quote-uri-id']) && empty($item['attachments']) && (empty($item['uri-id']) || !Post\Media::existsByURIId($item['uri-id']))) { Logger::notice('No body, no title.'); return false; } -- 2.39.5