]> git.mxchange.org Git - friendica.git/commitdiff
Add PR and Issue Numbers for TODO for createFromUriId hack in Mastodon API
authorHank Grabowski <hankgrabowski@gmail.com>
Tue, 15 Aug 2023 19:23:31 +0000 (15:23 -0400)
committerHank Grabowski <hankgrabowski@gmail.com>
Tue, 15 Aug 2023 19:23:31 +0000 (15:23 -0400)
src/Module/Api/Mastodon/Statuses/Bookmark.php
src/Module/Api/Mastodon/Statuses/Favourite.php
src/Module/Api/Mastodon/Statuses/Mute.php
src/Module/Api/Mastodon/Statuses/Pin.php
src/Module/Api/Mastodon/Statuses/Reblog.php
src/Module/Api/Mastodon/Statuses/Unbookmark.php
src/Module/Api/Mastodon/Statuses/Unfavourite.php
src/Module/Api/Mastodon/Statuses/Unmute.php
src/Module/Api/Mastodon/Statuses/Unpin.php
src/Module/Api/Mastodon/Statuses/Unreblog.php

index 9625b5e122df34eaeae6510e92c4c1043a977e00..7f32c9a43cefbd4a674165b63e1cf5bc408dee94 100644 (file)
@@ -65,7 +65,9 @@ class Bookmark extends BaseApi
 
                Item::update(['starred' => true], ['id' => $item['id']]);
 
-               // @TODO Remove once mstdnStatus()->createFromUriId is fixed
+               // @TODO Remove once mstdnStatus()->createFromUriId is fixed so that it returns posts not reshared posts if given an ID to an original post that has been reshared
+               // Introduced in this PR: https://github.com/friendica/friendica/pull/13175
+               // Issue tracking the behavior of createFromUriId: https://github.com/friendica/friendica/issues/13350
                $isReblog = $item['uri-id'] != $this->parameters['id'];
 
                System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes(), $isReblog)->toArray());
index 2e5159175638c0219488f10edbb14286296a936a..3543a3ba8f656b9719183f9c34b0a9a46ef56158 100644 (file)
@@ -49,7 +49,9 @@ class Favourite extends BaseApi
 
                Item::performActivity($item['id'], 'like', $uid);
 
-               // @TODO Remove once mstdnStatus()->createFromUriId is fixed
+               // @TODO Remove once mstdnStatus()->createFromUriId is fixed so that it returns posts not reshared posts if given an ID to an original post that has been reshared
+               // Introduced in this PR: https://github.com/friendica/friendica/pull/13175
+               // Issue tracking the behavior of createFromUriId: https://github.com/friendica/friendica/issues/13350
                $isReblog = $item['uri-id'] != $this->parameters['id'];
 
                System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes(), $isReblog)->toArray());
index 587999bad7674440cf85903ecb3c849e8c80c3c6..a99cd686358c5d8dd2126fc4b6f33ad69017608c 100644 (file)
@@ -53,7 +53,9 @@ class Mute extends BaseApi
 
                Post\ThreadUser::setIgnored($item['uri-id'], $uid, true);
 
-               // @TODO Remove once mstdnStatus()->createFromUriId is fixed
+               // @TODO Remove once mstdnStatus()->createFromUriId is fixed so that it returns posts not reshared posts if given an ID to an original post that has been reshared
+               // Introduced in this PR: https://github.com/friendica/friendica/pull/13175
+               // Issue tracking the behavior of createFromUriId: https://github.com/friendica/friendica/issues/13350
                $isReblog = $item['uri-id'] != $this->parameters['id'];
 
                System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes(), $isReblog)->toArray());
index 601f82f2d0f5057e48f7f4aad538f2c4650644a0..5d9a181135f0fdd012840db75a0e0ebb15a6943d 100644 (file)
@@ -48,7 +48,9 @@ class Pin extends BaseApi
 
                Post\Collection::add($item['uri-id'], Post\Collection::FEATURED, $item['author-id'], $uid);
 
-               // @TODO Remove once mstdnStatus()->createFromUriId is fixed
+               // @TODO Remove once mstdnStatus()->createFromUriId is fixed so that it returns posts not reshared posts if given an ID to an original post that has been reshared
+               // Introduced in this PR: https://github.com/friendica/friendica/pull/13175
+               // Issue tracking the behavior of createFromUriId: https://github.com/friendica/friendica/issues/13350
                $isReblog = $item['uri-id'] != $this->parameters['id'];
 
                System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes(),$isReblog)->toArray());
index 409f8e788f1bc9915f6cf7756f3d51b3b716f8a4..98cbd417d04691148cc455053f805ce2d3670f07 100644 (file)
@@ -58,7 +58,9 @@ class Reblog extends BaseApi
                        Item::performActivity($item['id'], 'announce', $uid);
                }
 
-               // @TODO Remove once mstdnStatus()->createFromUriId is fixed
+               // @TODO Remove once mstdnStatus()->createFromUriId is fixed so that it returns posts not reshared posts if given an ID to an original post that has been reshared
+               // Introduced in this PR: https://github.com/friendica/friendica/pull/13175
+               // Issue tracking the behavior of createFromUriId: https://github.com/friendica/friendica/issues/13350
                $isReblog = $item['uri-id'] != $this->parameters['id'];
 
                System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes(), $isReblog)->toArray());
index 03a3e6f002034ec7cbbf8b78834c1b354d906a2e..556db2b4b329fd15e43556db3ff91619a1e5c437 100644 (file)
@@ -65,7 +65,9 @@ class Unbookmark extends BaseApi
 
                Item::update(['starred' => false], ['id' => $item['id']]);
 
-               // @TODO Remove once mstdnStatus()->createFromUriId is fixed
+               // @TODO Remove once mstdnStatus()->createFromUriId is fixed so that it returns posts not reshared posts if given an ID to an original post that has been reshared
+               // Introduced in this PR: https://github.com/friendica/friendica/pull/13175
+               // Issue tracking the behavior of createFromUriId: https://github.com/friendica/friendica/issues/13350
                $isReblog = $item['uri-id'] != $this->parameters['id'];
 
                System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes(), $isReblog)->toArray());
index d95d9e09c0e4a7fef9aba6fe7bcd43d407a59cef..99358be55ae47e3032d212025f98e3dd3c765ba2 100644 (file)
@@ -49,7 +49,9 @@ class Unfavourite extends BaseApi
 
                Item::performActivity($item['id'], 'unlike', $uid);
 
-               // @TODO Remove once mstdnStatus()->createFromUriId is fixed
+               // @TODO Remove once mstdnStatus()->createFromUriId is fixed so that it returns posts not reshared posts if given an ID to an original post that has been reshared
+               // Introduced in this PR: https://github.com/friendica/friendica/pull/13175
+               // Issue tracking the behavior of createFromUriId: https://github.com/friendica/friendica/issues/13350
                $isReblog = $item['uri-id'] != $this->parameters['id'];
 
                System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes(), $isReblog)->toArray());
index 63cd6d722d09190e78b522ece80b4e233859aa83..b6d9c2b1959e5be456a8e210c54eb6cc6db8a57d 100644 (file)
@@ -53,7 +53,9 @@ class Unmute extends BaseApi
 
                Post\ThreadUser::setIgnored($item['uri-id'], $uid, false);
 
-               // @TODO Remove once mstdnStatus()->createFromUriId is fixed
+               // @TODO Remove once mstdnStatus()->createFromUriId is fixed so that it returns posts not reshared posts if given an ID to an original post that has been reshared
+               // Introduced in this PR: https://github.com/friendica/friendica/pull/13175
+               // Issue tracking the behavior of createFromUriId: https://github.com/friendica/friendica/issues/13350
                $isReblog = $item['uri-id'] != $this->parameters['id'];
 
                System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes(), $isReblog)->toArray());
index 22610f4468a2aa082b16ac66e51a25958e229031..75b1d6fa5f94c5b03a2ce69a378efec6aa5beda9 100644 (file)
@@ -48,7 +48,9 @@ class Unpin extends BaseApi
 
                Post\Collection::remove($item['uri-id'], Post\Collection::FEATURED, $uid);
 
-               // @TODO Remove once mstdnStatus()->createFromUriId is fixed
+               // @TODO Remove once mstdnStatus()->createFromUriId is fixed so that it returns posts not reshared posts if given an ID to an original post that has been reshared
+               // Introduced in this PR: https://github.com/friendica/friendica/pull/13175
+               // Issue tracking the behavior of createFromUriId: https://github.com/friendica/friendica/issues/13350
                $isReblog = $item['uri-id'] != $this->parameters['id'];
 
                System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes(), $isReblog)->toArray());
index a1544807f15cc3632a3f9a6267a2d893db419cec..6730e0fb56e9b834942c784867bc31d788543f8e 100644 (file)
@@ -64,7 +64,9 @@ class Unreblog extends BaseApi
                        Item::performActivity($item['id'], 'unannounce', $uid);
                }
 
-               // @TODO Remove once mstdnStatus()->createFromUriId is fixed
+               // @TODO Remove once mstdnStatus()->createFromUriId is fixed so that it returns posts not reshared posts if given an ID to an original post that has been reshared
+               // Introduced in this PR: https://github.com/friendica/friendica/pull/13175
+               // Issue tracking the behavior of createFromUriId: https://github.com/friendica/friendica/issues/13350
                $isReblog = $item['uri-id'] != $this->parameters['id'];
 
                System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes(), $isReblog)->toArray());