]> git.mxchange.org Git - friendica.git/commitdiff
Use the uri-id to fetch the contact
authorMichael <heluecht@pirati.ca>
Tue, 3 May 2022 21:51:56 +0000 (21:51 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 3 May 2022 21:51:56 +0000 (21:51 +0000)
database.sql
src/Content/Item.php
src/Model/Item.php
static/dbview.config.php

index bb53181e8840f7df4780bf6197eb68aabe8b4b37..5aa9a5b706904387975ee9156384080a7685d2d0 100644 (file)
@@ -1741,6 +1741,7 @@ CREATE VIEW `post-user-view` AS SELECT
        `author`.`hidden` AS `author-hidden`,
        `author`.`updated` AS `author-updated`,
        `author`.`gsid` AS `author-gsid`,
+       `author`.`uri-id` AS `author-uri-id`,
        `post-user`.`owner-id` AS `owner-id`,
        `owner`.`url` AS `owner-link`,
        `owner`.`addr` AS `owner-addr`,
@@ -1909,6 +1910,7 @@ CREATE VIEW `post-thread-user-view` AS SELECT
        `author`.`hidden` AS `author-hidden`,
        `author`.`updated` AS `author-updated`,
        `author`.`gsid` AS `author-gsid`,
+       `author`.`uri-id` AS `author-uri-id`,
        `post-thread-user`.`owner-id` AS `owner-id`,
        `owner`.`url` AS `owner-link`,
        `owner`.`addr` AS `owner-addr`,
@@ -2063,6 +2065,7 @@ CREATE VIEW `post-view` AS SELECT
        `author`.`hidden` AS `author-hidden`,
        `author`.`updated` AS `author-updated`,
        `author`.`gsid` AS `author-gsid`,
+       `author`.`uri-id` AS `author-uri-id`,
        `post`.`owner-id` AS `owner-id`,
        `owner`.`url` AS `owner-link`,
        `owner`.`addr` AS `owner-addr`,
@@ -2193,6 +2196,7 @@ CREATE VIEW `post-thread-view` AS SELECT
        `author`.`hidden` AS `author-hidden`,
        `author`.`updated` AS `author-updated`,
        `author`.`gsid` AS `author-gsid`,
+       `author`.`uri-id` AS `author-uri-id`,
        `post-thread`.`owner-id` AS `owner-id`,
        `owner`.`url` AS `owner-link`,
        `owner`.`addr` AS `owner-addr`,
index 0c60c4e26ff79dd38e6fc6a4a901f6b3e7381212..9136396ed1c26c9d3cb683fa36324d6d0838545d 100644 (file)
@@ -35,7 +35,6 @@ use Friendica\Model\Tag;
 use Friendica\Model\Post;
 use Friendica\Protocol\Activity;
 use Friendica\Util\Profiler;
-use Friendica\Util\Strings;
 use Friendica\Util\XML;
 
 /**
@@ -402,7 +401,7 @@ class Item
                $pcid = $item['author-id'];
                $network = '';
                $rel = 0;
-               $condition = ['uid' => local_user(), 'nurl' => Strings::normaliseLink($item['author-link'])];
+               $condition = ['uid' => local_user(), 'uri-id' => $item['author-uri-id']];
                $contact = DBA::selectFirst('contact', ['id', 'network', 'rel'], $condition);
                if (DBA::isResult($contact)) {
                        $cid = $contact['id'];
index b63b98d77376ddd80d71617a722b9ecf732d8190..96a12a1fd3d6563cc025ad8e7e1bc4d7013c6c70 100644 (file)
@@ -87,7 +87,7 @@ class Item
                'wall', 'private', 'starred', 'origin', 'parent-origin', 'title', 'body', 'language',
                'content-warning', 'location', 'coord', 'app', 'rendered-hash', 'rendered-html', 'object',
                'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid', 'mention', 'global',
-               'author-id', 'author-link', 'author-name', 'author-avatar', 'author-network', 'author-updated', 'author-gsid', 'author-addr',
+               'author-id', 'author-link', 'author-name', 'author-avatar', 'author-network', 'author-updated', 'author-gsid', 'author-addr', 'author-uri-id',
                'owner-id', 'owner-link', 'owner-name', 'owner-avatar', 'owner-network', 'owner-contact-type', 'owner-updated',
                'causer-id', 'causer-link', 'causer-name', 'causer-avatar', 'causer-contact-type', 'causer-network',
                'contact-id', 'contact-uid', 'contact-link', 'contact-name', 'contact-avatar',
index ea991489d67b0e9d74445bfb3882c508907b410b..e2e29d8f4f0f17bab7c5a9170a50521cf5954f17 100644 (file)
                        "author-hidden" => ["author", "hidden"],
                        "author-updated" => ["author", "updated"],
                        "author-gsid" => ["author", "gsid"],
+                       "author-uri-id" => ["author", "uri-id"],
                        "owner-id" => ["post-user", "owner-id"],
                        "owner-link" => ["owner", "url"],
                        "owner-addr" => ["owner", "addr"],
                        "author-hidden" => ["author", "hidden"],
                        "author-updated" => ["author", "updated"],
                        "author-gsid" => ["author", "gsid"],
+                       "author-uri-id" => ["author", "uri-id"],
                        "owner-id" => ["post-thread-user", "owner-id"],
                        "owner-link" => ["owner", "url"],
                        "owner-addr" => ["owner", "addr"],
                        "author-hidden" => ["author", "hidden"],
                        "author-updated" => ["author", "updated"],
                        "author-gsid" => ["author", "gsid"],
+                       "author-uri-id" => ["author", "uri-id"],
                        "owner-id" => ["post", "owner-id"],
                        "owner-link" => ["owner", "url"],
                        "owner-addr" => ["owner", "addr"],
                        "author-hidden" => ["author", "hidden"],
                        "author-updated" => ["author", "updated"],
                        "author-gsid" => ["author", "gsid"],
+                       "author-uri-id" => ["author", "uri-id"],
                        "owner-id" => ["post-thread", "owner-id"],
                        "owner-link" => ["owner", "url"],
                        "owner-addr" => ["owner", "addr"],