]> git.mxchange.org Git - friendica.git/commitdiff
Update searchindex on reshare
authorMichael <heluecht@pirati.ca>
Mon, 29 Jan 2024 12:32:21 +0000 (12:32 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 29 Jan 2024 12:32:21 +0000 (12:32 +0000)
src/Model/Item.php
src/Model/Post/SearchIndex.php

index d4983c5069fa3e3e0cf2943c05486ad513f59631..000960a6fec848b909ac76f833a0bb6fb5ed812c 100644 (file)
@@ -1451,6 +1451,8 @@ class Item
                        
                        if (in_array($posted_item['gravity'], [self::GRAVITY_PARENT, self::GRAVITY_COMMENT])) {
                                Post\SearchIndex::insert($posted_item['uri-id'], $posted_item['network'], $posted_item['private'], $posted_item['created']);
+                       } elseif ($posted_item['verb'] == Activity::ANNOUNCE) {
+                               Post\SearchIndex::update($posted_item['thr-parent-id']);
                        }
 
                        if (($posted_item['gravity'] == self::GRAVITY_ACTIVITY) && ($posted_item['verb'] == Activity::ANNOUNCE) && ($posted_item['parent-uri-id'] == $posted_item['thr-parent-id'])) {
index 1fbbe0b3f4e4815faded0c9e674b5b94ed35f780..67d6c91d1230878f3d28f4b8a672da5b4e613b18 100644 (file)
@@ -63,7 +63,7 @@ class SearchIndex
         */
        public static function update(int $uri_id)
        {
-               $searchtext = Post\Engagement::getSearchTextForUriId($uri_id, true);
+               $searchtext = Post\Engagement::getSearchTextForUriId($uri_id);
                return DBA::update('post-searchindex', ['searchtext' => $searchtext], ['uri-id' => $uri_id]);
        }