commit e7fa6d9

default  ·  2024-05-15 11:36:59 +0000 UTC
parent 0a6df8e
Skip hidden posts in content_search().
1 files changed,  +5, -0
M data.c
M data.c
+5, -0
 1@@ -2381,6 +2381,11 @@ xs_list *content_search(snac *user, const char *regex,
 2         if (!xs_match(xs_dict_get_def(post, "type", "-"), POSTLIKE_OBJECT_TYPE))
 3             continue;
 4 
 5+        const char *id = xs_dict_get(post, "id");
 6+
 7+        if (id == NULL || is_hidden(user, id))
 8+            continue;
 9+
10         char *content = xs_dict_get(post, "content");
11 
12         if (xs_is_null(content))