kopia lustrzana https://github.com/friendica/friendica
Merge pull request #12913 from HankG/fix-mastodon-api-image-posts-with-empty-status
Fix posting/editing empty text image posts through Mastodon APIpull/12898/head
commit
8bda2a2188
|
@ -589,7 +589,7 @@ class Item
|
||||||
public static function isValid(array $item): bool
|
public static function isValid(array $item): bool
|
||||||
{
|
{
|
||||||
// When there is no content then we don't post it
|
// 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.');
|
Logger::notice('No body, no title.');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue