From a1828430e5bac275fd3d1a075a165acf68230d29 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 29 Jul 2021 14:58:04 +0000 Subject: [PATCH] Fixing variables --- src/Model/Post/Delayed.php | 2 +- src/Module/Api/Mastodon/ScheduledStatuses.php | 2 +- src/Object/Api/Mastodon/ScheduledStatus.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Model/Post/Delayed.php b/src/Model/Post/Delayed.php index 9d4fa6902..65d29188b 100644 --- a/src/Model/Post/Delayed.php +++ b/src/Model/Post/Delayed.php @@ -115,7 +115,7 @@ class Delayed */ public static function getParametersForid(int $id) { - $delayed = DBA::selectFirst('delayed-post', ['id', 'wid', 'delayed'], ['id' => $id]); + $delayed = DBA::selectFirst('delayed-post', ['id', 'uid', 'wid', 'delayed'], ['id' => $id]); if (empty($delayed['wid'])) { return []; } diff --git a/src/Module/Api/Mastodon/ScheduledStatuses.php b/src/Module/Api/Mastodon/ScheduledStatuses.php index fbf451e6c..1c8a22282 100644 --- a/src/Module/Api/Mastodon/ScheduledStatuses.php +++ b/src/Module/Api/Mastodon/ScheduledStatuses.php @@ -40,7 +40,7 @@ class ScheduledStatuses extends BaseApi $uid = self::getCurrentUserID(); if (isset($parameters['id'])) { - System::jsonExit(DI::mstdnScheduledStatus()->createFromId($parameters['id'], $uid)); + System::jsonExit(DI::mstdnScheduledStatus()->createFromId($parameters['id'], $uid)->toArray()); } $request = self::getRequest([ diff --git a/src/Object/Api/Mastodon/ScheduledStatus.php b/src/Object/Api/Mastodon/ScheduledStatus.php index 3e78ce69a..f95586935 100644 --- a/src/Object/Api/Mastodon/ScheduledStatus.php +++ b/src/Object/Api/Mastodon/ScheduledStatus.php @@ -62,7 +62,7 @@ class ScheduledStatus extends BaseDataTransferObject { $visibility = ['public', 'private', 'unlisted']; - $this->id = (string)$delayed_post['uri-id']; + $this->id = (string)$delayed_post['id']; $this->scheduled_at = DateTimeFormat::utc($delayed_post['scheduled_at'], DateTimeFormat::JSON); $this->params = [