From e7fa6d992061b04038128320acef4c894ae69500 Mon Sep 17 00:00:00 2001 From: default Date: Wed, 15 May 2024 13:36:59 +0200 Subject: [PATCH] Skip hidden posts in content_search(). --- data.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/data.c b/data.c index 5abbeaf..0cceefd 100644 --- a/data.c +++ b/data.c @@ -2381,6 +2381,11 @@ xs_list *content_search(snac *user, const char *regex, if (!xs_match(xs_dict_get_def(post, "type", "-"), POSTLIKE_OBJECT_TYPE)) continue; + const char *id = xs_dict_get(post, "id"); + + if (id == NULL || is_hidden(user, id)) + continue; + char *content = xs_dict_get(post, "content"); if (xs_is_null(content))