diff options
| author | 2023-04-27 08:35:23 +0200 | |
|---|---|---|
| committer | 2023-04-27 08:35:23 +0200 | |
| commit | a28d717da586b77a77fed9bc8df7dd543bcfb632 (patch) | |
| tree | d72951f996895bbcc139bba24b6e285f43db5e89 /mastoapi.c | |
| parent | Updated documentation. (diff) | |
| download | snac2-a28d717da586b77a77fed9bc8df7dd543bcfb632.tar.gz snac2-a28d717da586b77a77fed9bc8df7dd543bcfb632.tar.xz snac2-a28d717da586b77a77fed9bc8df7dd543bcfb632.zip | |
Hide hidden posts from timelines.
Diffstat (limited to 'mastoapi.c')
| -rw-r--r-- | mastoapi.c | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -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 | ||