diff --git a/src/Module/Api/Mastodon/Statuses/Bookmark.php b/src/Module/Api/Mastodon/Statuses/Bookmark.php index 59c61f991..9625b5e12 100644 --- a/src/Module/Api/Mastodon/Statuses/Bookmark.php +++ b/src/Module/Api/Mastodon/Statuses/Bookmark.php @@ -65,6 +65,9 @@ class Bookmark extends BaseApi Item::update(['starred' => true], ['id' => $item['id']]); - System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes())->toArray()); + // @TODO Remove once mstdnStatus()->createFromUriId is fixed + $isReblog = $item['uri-id'] != $this->parameters['id']; + + System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes(), $isReblog)->toArray()); } } diff --git a/src/Module/Api/Mastodon/Statuses/Mute.php b/src/Module/Api/Mastodon/Statuses/Mute.php index 1f00d39d0..587999bad 100644 --- a/src/Module/Api/Mastodon/Statuses/Mute.php +++ b/src/Module/Api/Mastodon/Statuses/Mute.php @@ -53,6 +53,9 @@ class Mute extends BaseApi Post\ThreadUser::setIgnored($item['uri-id'], $uid, true); - System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes())->toArray()); + // @TODO Remove once mstdnStatus()->createFromUriId is fixed + $isReblog = $item['uri-id'] != $this->parameters['id']; + + System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes(), $isReblog)->toArray()); } } diff --git a/src/Module/Api/Mastodon/Statuses/Pin.php b/src/Module/Api/Mastodon/Statuses/Pin.php index 33a0116eb..601f82f2d 100644 --- a/src/Module/Api/Mastodon/Statuses/Pin.php +++ b/src/Module/Api/Mastodon/Statuses/Pin.php @@ -48,6 +48,9 @@ class Pin extends BaseApi Post\Collection::add($item['uri-id'], Post\Collection::FEATURED, $item['author-id'], $uid); - System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes())->toArray()); + // @TODO Remove once mstdnStatus()->createFromUriId is fixed + $isReblog = $item['uri-id'] != $this->parameters['id']; + + System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes(),$isReblog)->toArray()); } } diff --git a/src/Module/Api/Mastodon/Statuses/Reblog.php b/src/Module/Api/Mastodon/Statuses/Reblog.php index f1922d727..409f8e788 100644 --- a/src/Module/Api/Mastodon/Statuses/Reblog.php +++ b/src/Module/Api/Mastodon/Statuses/Reblog.php @@ -45,7 +45,7 @@ class Reblog extends BaseApi DI::mstdnError()->UnprocessableEntity(); } - $item = Post::selectOriginalForUser($uid, ['id', 'network'], ['uri-id' => $this->parameters['id'], 'uid' => [$uid, 0]]); + $item = Post::selectOriginalForUser($uid, ['id', 'uri-id', 'network'], ['uri-id' => $this->parameters['id'], 'uid' => [$uid, 0]]); if (!DBA::isResult($item)) { DI::mstdnError()->RecordNotFound(); } @@ -58,6 +58,9 @@ class Reblog extends BaseApi Item::performActivity($item['id'], 'announce', $uid); } - System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes())->toArray()); + // @TODO Remove once mstdnStatus()->createFromUriId is fixed + $isReblog = $item['uri-id'] != $this->parameters['id']; + + System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes(), $isReblog)->toArray()); } } diff --git a/src/Module/Api/Mastodon/Statuses/Unbookmark.php b/src/Module/Api/Mastodon/Statuses/Unbookmark.php index f95fd9445..03a3e6f00 100644 --- a/src/Module/Api/Mastodon/Statuses/Unbookmark.php +++ b/src/Module/Api/Mastodon/Statuses/Unbookmark.php @@ -65,6 +65,9 @@ class Unbookmark extends BaseApi Item::update(['starred' => false], ['id' => $item['id']]); - System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes())->toArray()); + // @TODO Remove once mstdnStatus()->createFromUriId is fixed + $isReblog = $item['uri-id'] != $this->parameters['id']; + + System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes(), $isReblog)->toArray()); } } diff --git a/src/Module/Api/Mastodon/Statuses/Unmute.php b/src/Module/Api/Mastodon/Statuses/Unmute.php index 2285422ca..63cd6d722 100644 --- a/src/Module/Api/Mastodon/Statuses/Unmute.php +++ b/src/Module/Api/Mastodon/Statuses/Unmute.php @@ -53,6 +53,9 @@ class Unmute extends BaseApi Post\ThreadUser::setIgnored($item['uri-id'], $uid, false); - System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes())->toArray()); + // @TODO Remove once mstdnStatus()->createFromUriId is fixed + $isReblog = $item['uri-id'] != $this->parameters['id']; + + System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes(), $isReblog)->toArray()); } } diff --git a/src/Module/Api/Mastodon/Statuses/Unpin.php b/src/Module/Api/Mastodon/Statuses/Unpin.php index c80582d15..22610f446 100644 --- a/src/Module/Api/Mastodon/Statuses/Unpin.php +++ b/src/Module/Api/Mastodon/Statuses/Unpin.php @@ -48,6 +48,9 @@ class Unpin extends BaseApi Post\Collection::remove($item['uri-id'], Post\Collection::FEATURED, $uid); - System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes())->toArray()); + // @TODO Remove once mstdnStatus()->createFromUriId is fixed + $isReblog = $item['uri-id'] != $this->parameters['id']; + + System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes(), $isReblog)->toArray()); } } diff --git a/src/Module/Api/Mastodon/Statuses/Unreblog.php b/src/Module/Api/Mastodon/Statuses/Unreblog.php index 54a18823a..a1544807f 100644 --- a/src/Module/Api/Mastodon/Statuses/Unreblog.php +++ b/src/Module/Api/Mastodon/Statuses/Unreblog.php @@ -44,7 +44,7 @@ class Unreblog extends BaseApi DI::mstdnError()->UnprocessableEntity(); } - $item = Post::selectOriginalForUser($uid, ['id', 'network'], ['uri-id' => $this->parameters['id'], 'uid' => [$uid, 0]]); + $item = Post::selectOriginalForUser($uid, ['id', 'uri-id', 'network'], ['uri-id' => $this->parameters['id'], 'uid' => [$uid, 0]]); if (!DBA::isResult($item)) { DI::mstdnError()->RecordNotFound(); } @@ -64,6 +64,9 @@ class Unreblog extends BaseApi Item::performActivity($item['id'], 'unannounce', $uid); } - System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes())->toArray()); + // @TODO Remove once mstdnStatus()->createFromUriId is fixed + $isReblog = $item['uri-id'] != $this->parameters['id']; + + System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes(), $isReblog)->toArray()); } }