From e7e74819a3f7c72472d47106dd802e87786465a3 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 29 Nov 2021 18:03:34 +0000 Subject: [PATCH] Fix posting pictures --- src/Module/Api/Twitter/Statuses/Update.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Module/Api/Twitter/Statuses/Update.php b/src/Module/Api/Twitter/Statuses/Update.php index b15b7f189..18cb932f8 100644 --- a/src/Module/Api/Twitter/Statuses/Update.php +++ b/src/Module/Api/Twitter/Statuses/Update.php @@ -56,7 +56,7 @@ class Update extends BaseApi 'in_reply_to_status_id' => 0, 'lat' => 0, 'long' => 0, - 'media_ids' => [], + 'media_ids' => '', 'source' => '', 'include_entities' => false, ], $request); @@ -127,9 +127,9 @@ class Update extends BaseApi $item['object-type'] = Activity\ObjectType::NOTE; } - $ids = $request['media_ids']; - - if (!empty($_FILES['media'])) { + if (!empty($_REQUEST['media_ids'])) { + $ids = explode(',', $_REQUEST['media_ids']); + } elseif (!empty($_FILES['media'])) { // upload the image if we have one $picture = Photo::upload($uid, $_FILES['media']); if (!empty($picture)) {