Preparations for "featured" posts

This commit is contained in:
Michael
2022-04-06 13:34:11 +00:00
parent 29f65d250f
commit a1dd299eb3
8 changed files with 125 additions and 5 deletions

View File

@@ -93,6 +93,7 @@
"parent-origin" => ["post-thread-user", "origin"],
"mention" => ["post-thread-user", "mention"],
"global" => ["post-user", "global"],
"featured" => "EXISTS(SELECT `type` FROM `post-collection` WHERE `type` = 0 AND `uri-id` = `post-user`.`uri-id`)",
"network" => ["post-user", "network"],
"vid" => ["post-user", "vid"],
"psid" => ["post-user", "psid"],
@@ -251,6 +252,7 @@
"origin" => ["post-thread-user", "origin"],
"mention" => ["post-thread-user", "mention"],
"global" => ["post-user", "global"],
"featured" => "EXISTS(SELECT `type` FROM `post-collection` WHERE `type` = 0 AND `uri-id` = `post-thread-user`.`uri-id`)",
"network" => ["post-thread-user", "network"],
"vid" => ["post-user", "vid"],
"psid" => ["post-thread-user", "psid"],
@@ -395,6 +397,7 @@
"visible" => ["post", "visible"],
"deleted" => ["post", "deleted"],
"global" => ["post", "global"],
"featured" => "EXISTS(SELECT `type` FROM `post-collection` WHERE `type` = 0 AND `uri-id` = `post`.`uri-id`)",
"network" => ["post", "network"],
"vid" => ["post", "vid"],
"verb" => "IF (`post`.`vid` IS NULL, '', `verb`.`name`)",
@@ -514,6 +517,7 @@
"visible" => ["post", "visible"],
"deleted" => ["post", "deleted"],
"global" => ["post", "global"],
"featured" => "EXISTS(SELECT `type` FROM `post-collection` WHERE `type` = 0 AND `uri-id` = `post-thread`.`uri-id`)",
"network" => ["post-thread", "network"],
"vid" => ["post", "vid"],
"verb" => "IF (`post`.`vid` IS NULL, '', `verb`.`name`)",