summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-05-24 14:12:21 +0200
committerdefault <nobody@localhost>2023-05-24 14:12:21 +0200
commitbf6fcee21c708d299895713ab775fcc666a8124d (patch)
tree466ba201f0f6dcde4688ca46f26a96b8a4c01cde /mastoapi.c
parente75b76da7c8f8e080e084cfbd3f98058c5a43a98 (diff)
In mastoapi, don't show poll votes in timelines.
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mastoapi.c b/mastoapi.c
index 104c7f1..6403e06 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -1157,6 +1157,10 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
if (is_hidden(&snac1, xs_dict_get(msg, "id")))
continue;
+ /* discard poll votes (they have a name) */
+ if (!xs_is_null(xs_dict_get(msg, "name")))
+ continue;
+
/* convert the Note into a Mastodon status */
xs *st = mastoapi_status(&snac1, msg);