+ // 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]);
+ } else {
+ DBA::update('user-item', ['ignored' => $ignored], ['iid' => $message_id, 'uid' => local_user()], true);
+ }