]> git.mxchange.org Git - friendica.git/commitdiff
Clarify condition on offset in Mastodon\Search->searchStatuses
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 18 Feb 2024 23:48:37 +0000 (18:48 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 18 Feb 2024 23:48:37 +0000 (18:48 -0500)
src/Module/Api/Mastodon/Search.php

index 9cef70972bc04b533825b8741977bcc5d7d656b2..8f511395bc5e47039a0afb66558fe5bd630e2c53 100644 (file)
@@ -137,7 +137,8 @@ class Search extends BaseApi
        private static function searchStatuses(int $uid, string $q, string $account_id, int $max_id, int $min_id, int $limit, int $offset)
        {
                if (Network::isValidHttpUrl($q)) {
-                       if ($offset != 0) {
+                       // Unique post search, any offset greater than 0 should return empty result
+                       if ($offset > 0) {
                                return [];
                        }
                        $q = Network::convertToIdn($q);