Merge pull request #12895 from HankG/mastodon-status-edit-fix-deleting-all-images
Fix being able to remove all images from post through Mastodon editing
This commit is contained in:
commit
a0f3a49238
|
@ -110,7 +110,6 @@ class Statuses extends BaseApi
|
||||||
|
|
||||||
$item = DI::contentItem()->expandTags($item, $request['visibility'] == 'direct');
|
$item = DI::contentItem()->expandTags($item, $request['visibility'] == 'direct');
|
||||||
|
|
||||||
if (!empty($request['media_ids'])) {
|
|
||||||
/*
|
/*
|
||||||
The provided ids in the request value consists of these two sources:
|
The provided ids in the request value consists of these two sources:
|
||||||
- The id in the "photo" table for newly uploaded media
|
- The id in the "photo" table for newly uploaded media
|
||||||
|
@ -146,7 +145,7 @@ class Statuses extends BaseApi
|
||||||
Post\Media::insert($attachment);
|
Post\Media::insert($attachment);
|
||||||
}
|
}
|
||||||
unset($item['attachments']);
|
unset($item['attachments']);
|
||||||
}
|
|
||||||
if (!Item::isValid($item)) {
|
if (!Item::isValid($item)) {
|
||||||
throw new \Exception('Missing parameters in definition');
|
throw new \Exception('Missing parameters in definition');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user