Просмотр исходного кода

Hide hidden posts from timelines.

default 3 лет назад
Родитель
Сommit
a28d717da5
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      mastoapi.c

+ 5 - 1
mastoapi.c

@@ -1000,10 +1000,14 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
                 if (strcmp(xs_dict_get(msg, "type"), "Note") != 0)
                     continue;
 
-                /* drop notes from muted morons */
+                /* discard notes from muted morons */
                 if (is_muted(&snac1, xs_dict_get(msg, "attributedTo")))
                     continue;
 
+                /* discard hidden notes */
+                if (is_hidden(&snac1, xs_dict_get(msg, "id")))
+                    continue;
+
                 /* convert the Note into a Mastodon status */
                 xs *st = mastoapi_status(&snac1, msg);