diff --git a/database.sql b/database.sql index 785b0f7b54..7a8ee0adb7 100644 --- a/database.sql +++ b/database.sql @@ -2246,9 +2246,14 @@ CREATE VIEW `collection-view` AS SELECT `post-collection`.`type` AS `type`, `post`.`author-id` AS `cid`, `post`.`received` AS `received`, - `post`.`created` AS `created` + `post`.`created` AS `created`, + `post-thread`.`commented` AS `commented`, + `post`.`thr-parent-id` AS `thr-parent-id`, + `post`.`author-id` AS `author-id`, + `post`.`gravity` AS `gravity` FROM `post-collection` - INNER JOIN `post` ON `post-collection`.`uri-id` = `post`.`uri-id`; + INNER JOIN `post` ON `post-collection`.`uri-id` = `post`.`uri-id` + INNER JOIN `post-thread` ON `post-thread`.`uri-id` = `post`.`parent-uri-id`; -- -- VIEW tag-view diff --git a/src/Model/Item.php b/src/Model/Item.php index 84fa0af11b..b63b98d773 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-id', 'author-link', 'author-name', 'author-avatar', 'author-network', 'author-updated', 'author-gsid', 'author-addr', '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 a623e46365..ea991489d6 100644 --- a/static/dbview.config.php +++ b/static/dbview.config.php @@ -664,9 +664,14 @@ "cid" => ["post", "author-id"], "received" => ["post", "received"], "created" => ["post", "created"], + "commented" => ["post-thread", "commented"], + "thr-parent-id" => ["post", "thr-parent-id"], + "author-id" => ["post", "author-id"], + "gravity" => ["post", "gravity"], ], "query" => "FROM `post-collection` - INNER JOIN `post` ON `post-collection`.`uri-id` = `post`.`uri-id`" + INNER JOIN `post` ON `post-collection`.`uri-id` = `post`.`uri-id` + INNER JOIN `post-thread` ON `post-thread`.`uri-id` = `post`.`parent-uri-id`" ], "tag-view" => [ "fields" => [