]> git.mxchange.org Git - friendica.git/commitdiff
Issue 14134: Allow reshare posts from Bluesky and Tumblr
authorMichael <heluecht@pirati.ca>
Fri, 10 May 2024 04:55:57 +0000 (04:55 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 10 May 2024 04:55:57 +0000 (04:55 +0000)
src/Module/Api/Mastodon/Statuses/Reblog.php
src/Module/Api/Mastodon/Statuses/Unreblog.php
src/Module/Api/Twitter/Statuses/Retweet.php

index 10ca2b95b0c6126a712e53910030c4fdc04568ca..76bb721b2aa7ced110e188d7b5c220ff2352c2b3 100644 (file)
@@ -52,7 +52,7 @@ class Reblog extends BaseApi
 
                if ($item['network'] == Protocol::DIASPORA) {
                        Diaspora::performReshare($this->parameters['id'], $uid);
-               } elseif (!in_array($item['network'], [Protocol::DFRN, Protocol::ACTIVITYPUB, Protocol::TWITTER])) {
+               } elseif (!in_array($item['network'], [Protocol::DFRN, Protocol::ACTIVITYPUB, Protocol::BLUESKY, Protocol::TUMBLR, Protocol::TWITTER])) {
                        $this->logAndJsonError(
                                422,
                                $this->errorFactory->UnprocessableEntity($this->t("Posts from %s can't be shared", ContactSelector::networkToName($item['network'])))
index f857a935d22d7f9d4682f44f5263640763c84d01..33e0d0b16ae6402664a774d8a2d90c9ca8921692 100644 (file)
@@ -58,7 +58,7 @@ class Unreblog extends BaseApi
                        if (!Item::markForDeletionById($item['id'])) {
                                $this->logAndJsonError(404, $this->errorFactory->RecordNotFound());
                        }
-               } elseif (!in_array($item['network'], [Protocol::DFRN, Protocol::ACTIVITYPUB, Protocol::TWITTER])) {
+               } elseif (!in_array($item['network'], [Protocol::DFRN, Protocol::ACTIVITYPUB, Protocol::BLUESKY, Protocol::TUMBLR, Protocol::TWITTER])) {
                        $this->logAndJsonError(
                                422,
                                $this->errorFactory->UnprocessableEntity($this->t("Posts from %s can't be unshared", ContactSelector::networkToName($item['network'])))
index 9614cc9fe2e1b61f80faa324139230c0b621c064..6e98921592ddebcf8bcf552ae1f032ec0922c8bd 100644 (file)
@@ -54,7 +54,7 @@ class Retweet extends BaseApi
                $item   = Post::selectFirst($fields, ['uri-id' => $id, 'uid' => [0, $uid], 'private' => [Item::PUBLIC, Item::UNLISTED]], ['order' => ['uid' => true]]);
 
                if (DBA::isResult($item) && !empty($item['body'])) {
-                       if (in_array($item['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::TWITTER])) {
+                       if (in_array($item['network'], [Protocol::ACTIVITYPUB, Protocol::DFRN, Protocol::BLUESKY, Protocol::TUMBLR, Protocol::TWITTER])) {
                                if (!Item::performActivity($id, 'announce', $uid)) {
                                        throw new InternalServerErrorException();
                                }