]> git.mxchange.org Git - friendica.git/commitdiff
Changes after code review
authorMichael <heluecht@pirati.ca>
Wed, 30 Nov 2022 14:33:55 +0000 (14:33 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 30 Nov 2022 14:33:55 +0000 (14:33 +0000)
src/Factory/Api/Mastodon/Status.php
src/Model/Contact/Relation.php
src/Worker/UpdateAllSuggestions.php
src/Worker/UpdateSuggestions.php

index 7aa31077ba0fdd751ee1148882469e82af0ac0e1..dba74b140743873c72502d488f5b05b7e938df21 100644 (file)
@@ -204,7 +204,7 @@ class Status extends BaseFactory
                if ($is_reshare) {
                        $reshare = $this->createFromUriId($uriId, $uid, false)->toArray();
                }
-//             $mentions = array_unique($mentions);
+
                return new \Friendica\Object\Api\Mastodon\Status($item, $account, $counts, $userAttributes, $sensitive, $application, $mentions, $tags, $card, $attachments, $reshare, $poll);
        }
 
index 5f2f07d39703b00370b7ac49b63d7aa5078fe22e..5a85ebebc58421032125918299ab79c7a309edd7 100644 (file)
@@ -266,7 +266,7 @@ class Relation
         * @param integer $uid
         * @return void
         */
-       static public function updateSuggestions(int $uid)
+       static public function updateCachedSuggestions(int $uid)
        {
                if (DI::pConfig()->get($uid, 'suggestion', 'last_update') + 3600 > time()) {
                        return;
index b1c84b639e8fa7b9be81538ea4b8ca108500c031..5bc6476145b352867f6cd43cb42f3993a2bff237 100644 (file)
@@ -34,7 +34,7 @@ class UpdateAllSuggestions
        {
                $users = DBA::select('user', ['uid'], ["`login_date` > ?", DateTimeFormat::utc('now - 7 days')]);
                while ($user = DBA::fetch($users)) {
-                       Contact\Relation::updateSuggestions($user['uid']);
+                       Contact\Relation::updateCachedSuggestions($user['uid']);
                }
                DBA::close($users);
        }
index c756ed10f59dde23d52f538b479bf5d55efb6d2c..509fee05a923c7328353b30da31674fa7aa94a75 100644 (file)
@@ -30,6 +30,6 @@ class UpdateSuggestions
 {
        public static function execute(int $uid)
        {
-               Contact\Relation::updateSuggestions($uid);
+               Contact\Relation::updateCachedSuggestions($uid);
        }
 }