From ffd2014257b6e5865f626f5064e5e2d3af754fdb Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 15 Aug 2018 11:27:11 +0200 Subject: [PATCH] Fixes the missing refresh after ignoring or unignoring a thread (#5614) * Fixes the missing refresh after ignoring or unignoring a thread * Use numeric values to make the JSON output happy --- mod/ignored.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/mod/ignored.php b/mod/ignored.php index f42e3a8bd..8502874ce 100644 --- a/mod/ignored.php +++ b/mod/ignored.php @@ -7,8 +7,6 @@ use Friendica\Model\Item; function ignored_init(App $a) { - $ignored = 0; - if (!local_user()) { killme(); } @@ -26,9 +24,8 @@ function ignored_init(App $a) killme(); } - if (!$thread['ignored']) { - $ignored = true; - } + // Numeric values are needed for the json output further below + $ignored = ($thread['ignored'] ? 0 : 1); if ($thread['uid'] != 0) { DBA::update('thread', ['ignored' => $ignored], ['iid' => $message_id]);