From 4cc52cef6b84e02687be5e306ef333060dcc8f53 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 15 Jan 2021 11:31:24 +0000 Subject: [PATCH] Added "blocked" fields --- database.sql | 4 ++++ static/dbview.config.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/database.sql b/database.sql index 47d76fdf6..65da2f7cf 100644 --- a/database.sql +++ b/database.sql @@ -1559,6 +1559,7 @@ CREATE VIEW `post-view` AS SELECT `contact`.`nick` AS `contact-nick`, `contact`.`thumb` AS `contact-avatar`, `contact`.`network` AS `contact-network`, + `contact`.`blocked` AS `contact-blocked`, `contact`.`uid` AS `contact-uid`, IF (`item`.`network` IN ('apub', 'dfrn', 'dspr', 'stat'), true, `contact`.`writable`) AS `writable`, `contact`.`self` AS `self`, @@ -1577,6 +1578,7 @@ CREATE VIEW `post-view` AS SELECT `author`.`nick` AS `author-nick`, IF (`contact`.`url` = `author`.`url`, `contact`.`thumb`, `author`.`thumb`) AS `author-avatar`, `author`.`network` AS `author-network`, + `author`.`blocked` AS `author-blocked`, `item`.`owner-id` AS `owner-id`, `owner`.`url` AS `owner-link`, `owner`.`addr` AS `owner-addr`, @@ -1584,6 +1586,7 @@ CREATE VIEW `post-view` AS SELECT `owner`.`nick` AS `owner-nick`, IF (`contact`.`url` = `owner`.`url`, `contact`.`thumb`, `owner`.`thumb`) AS `owner-avatar`, `owner`.`network` AS `owner-network`, + `owner`.`blocked` AS `owner-blocked`, `item`.`causer-id` AS `causer-id`, `causer`.`url` AS `causer-link`, `causer`.`addr` AS `causer-addr`, @@ -1591,6 +1594,7 @@ CREATE VIEW `post-view` AS SELECT `causer`.`nick` AS `causer-nick`, `causer`.`thumb` AS `causer-avatar`, `causer`.`network` AS `causer-network`, + `causer`.`blocked` AS `causer-blocked`, `causer`.`contact-type` AS `causer-contact-type`, `post-delivery-data`.`postopts` AS `postopts`, `post-delivery-data`.`inform` AS `inform`, diff --git a/static/dbview.config.php b/static/dbview.config.php index 63f5de822..9dc7791f7 100644 --- a/static/dbview.config.php +++ b/static/dbview.config.php @@ -105,6 +105,7 @@ return [ "contact-nick" => ["contact", "nick"], "contact-avatar" => ["contact", "thumb"], "contact-network" => ["contact", "network"], + "contact-blocked" => ["contact", "blocked"], "contact-uid" => ["contact", "uid"], "writable" => "IF (`item`.`network` IN ('apub', 'dfrn', 'dspr', 'stat'), true, `contact`.`writable`)", "self" => ["contact", "self"], @@ -123,6 +124,7 @@ return [ "author-nick" => ["author", "nick"], "author-avatar" => "IF (`contact`.`url` = `author`.`url`, `contact`.`thumb`, `author`.`thumb`)", "author-network" => ["author", "network"], + "author-blocked" => ["author", "blocked"], "owner-id" => ["item", "owner-id"], "owner-link" => ["owner", "url"], "owner-addr" => ["owner", "addr"], @@ -130,6 +132,7 @@ return [ "owner-nick" => ["owner", "nick"], "owner-avatar" => "IF (`contact`.`url` = `owner`.`url`, `contact`.`thumb`, `owner`.`thumb`)", "owner-network" => ["owner", "network"], + "owner-blocked" => ["owner", "blocked"], "causer-id" => ["item", "causer-id"], "causer-link" => ["causer", "url"], "causer-addr" => ["causer", "addr"], @@ -137,6 +140,7 @@ return [ "causer-nick" => ["causer", "nick"], "causer-avatar" => ["causer", "thumb"], "causer-network" => ["causer", "network"], + "causer-blocked" => ["causer", "blocked"], "causer-contact-type" => ["causer", "contact-type"], "postopts" => ["post-delivery-data", "postopts"], "inform" => ["post-delivery-data", "inform"],