summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authorGravatar default2023-04-27 08:35:23 +0200
committerGravatar default2023-04-27 08:35:23 +0200
commita28d717da586b77a77fed9bc8df7dd543bcfb632 (patch)
treed72951f996895bbcc139bba24b6e285f43db5e89 /mastoapi.c
parentUpdated documentation. (diff)
downloadsnac2-a28d717da586b77a77fed9bc8df7dd543bcfb632.tar.gz
snac2-a28d717da586b77a77fed9bc8df7dd543bcfb632.tar.xz
snac2-a28d717da586b77a77fed9bc8df7dd543bcfb632.zip
Hide hidden posts from timelines.
Diffstat (limited to 'mastoapi.c')
-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,
1000 if (strcmp(xs_dict_get(msg, "type"), "Note") != 0) 1000 if (strcmp(xs_dict_get(msg, "type"), "Note") != 0)
1001 continue; 1001 continue;
1002 1002
1003 /* drop notes from muted morons */ 1003 /* discard notes from muted morons */
1004 if (is_muted(&snac1, xs_dict_get(msg, "attributedTo"))) 1004 if (is_muted(&snac1, xs_dict_get(msg, "attributedTo")))
1005 continue; 1005 continue;
1006 1006
1007 /* discard hidden notes */
1008 if (is_hidden(&snac1, xs_dict_get(msg, "id")))
1009 continue;
1010
1007 /* convert the Note into a Mastodon status */ 1011 /* convert the Note into a Mastodon status */
1008 xs *st = mastoapi_status(&snac1, msg); 1012 xs *st = mastoapi_status(&snac1, msg);
1009 1013