mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
Skip hidden posts in content_search().
This commit is contained in:
parent
0a6df8e504
commit
e7fa6d9920
1 changed files with 5 additions and 0 deletions
5
data.c
5
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))
|
if (!xs_match(xs_dict_get_def(post, "type", "-"), POSTLIKE_OBJECT_TYPE))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
const char *id = xs_dict_get(post, "id");
|
||||||
|
|
||||||
|
if (id == NULL || is_hidden(user, id))
|
||||||
|
continue;
|
||||||
|
|
||||||
char *content = xs_dict_get(post, "content");
|
char *content = xs_dict_get(post, "content");
|
||||||
|
|
||||||
if (xs_is_null(content))
|
if (xs_is_null(content))
|
||||||
|
|
Loading…
Reference in a new issue