diff --git a/database.sql b/database.sql index bb53181e88..5aa9a5b706 100644 --- a/database.sql +++ b/database.sql @@ -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`, diff --git a/src/Content/Item.php b/src/Content/Item.php index 0c60c4e26f..9136396ed1 100644 --- a/src/Content/Item.php +++ b/src/Content/Item.php @@ -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']; diff --git a/src/Model/Item.php b/src/Model/Item.php index b63b98d773..96a12a1fd3 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -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', diff --git a/static/dbview.config.php b/static/dbview.config.php index ea991489d6..e2e29d8f4f 100644 --- a/static/dbview.config.php +++ b/static/dbview.config.php @@ -148,6 +148,7 @@ "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"], @@ -314,6 +315,7 @@ "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"], @@ -466,6 +468,7 @@ "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"], @@ -594,6 +597,7 @@ "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"],