mirror of
https://github.com/friendica/friendica
synced 2024-12-23 08:40:16 +00:00
Fix being able to remove all images from post through Mastodon edit endpoint
This commit is contained in:
parent
b3d779ef7b
commit
e7058ffe8c
1 changed files with 31 additions and 32 deletions
|
@ -110,7 +110,6 @@ class Statuses extends BaseApi
|
|||
|
||||
$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 id in the "photo" table for newly uploaded media
|
||||
|
@ -146,7 +145,7 @@ class Statuses extends BaseApi
|
|||
Post\Media::insert($attachment);
|
||||
}
|
||||
unset($item['attachments']);
|
||||
}
|
||||
|
||||
if (!Item::isValid($item)) {
|
||||
throw new \Exception('Missing parameters in definition');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue