summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-04-27 08:35:23 +0200
committerdefault <nobody@localhost>2023-04-27 08:35:23 +0200
commita28d717da586b77a77fed9bc8df7dd543bcfb632 (patch)
treed72951f996895bbcc139bba24b6e285f43db5e89
parent458d6217b4700eab9fe861a580ff4fe310cb72d0 (diff)
Hide hidden posts from timelines.
-rw-r--r--mastoapi.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 18028cd..41f56af 100644
--- a/mastoapi.c
+++ b/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);