diff options
| author | 2024-05-15 13:36:59 +0200 | |
|---|---|---|
| committer | 2024-05-15 13:36:59 +0200 | |
| commit | e7fa6d992061b04038128320acef4c894ae69500 (patch) | |
| tree | 1714047f9d98d51d352c2d24b333fcef115b5d93 | |
| parent | Renamed content_check() to content_match(). (diff) | |
| download | penes-snac2-e7fa6d992061b04038128320acef4c894ae69500.tar.gz penes-snac2-e7fa6d992061b04038128320acef4c894ae69500.tar.xz penes-snac2-e7fa6d992061b04038128320acef4c894ae69500.zip | |
Skip hidden posts in content_search().
Diffstat (limited to '')
| -rw-r--r-- | data.c | 5 |
1 files changed, 5 insertions, 0 deletions
| @@ -2381,6 +2381,11 @@ xs_list *content_search(snac *user, const char *regex, | |||
| 2381 | if (!xs_match(xs_dict_get_def(post, "type", "-"), POSTLIKE_OBJECT_TYPE)) | 2381 | if (!xs_match(xs_dict_get_def(post, "type", "-"), POSTLIKE_OBJECT_TYPE)) |
| 2382 | continue; | 2382 | continue; |
| 2383 | 2383 | ||
| 2384 | const char *id = xs_dict_get(post, "id"); | ||
| 2385 | |||
| 2386 | if (id == NULL || is_hidden(user, id)) | ||
| 2387 | continue; | ||
| 2388 | |||
| 2384 | char *content = xs_dict_get(post, "content"); | 2389 | char *content = xs_dict_get(post, "content"); |
| 2385 | 2390 | ||
| 2386 | if (xs_is_null(content)) | 2391 | if (xs_is_null(content)) |