diff options
| author | default <nobody@localhost> | 2024-12-19 04:24:25 +0100 |
|---|---|---|
| committer | default <nobody@localhost> | 2024-12-19 04:24:25 +0100 |
| commit | 844825f190f8651da36100d2a50cef54eaac14c1 (patch) | |
| tree | 6e44a7b8d60230be343913046fcec0d56c9bb8dc | |
| parent | e9f3d5120c23406d0e395bea9daf23b2a1300c88 (diff) | |
content_search() also checks for the post id.
| -rw-r--r-- | data.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -2742,6 +2742,14 @@ xs_list *content_search(snac *user, const char *regex, if (id == NULL || is_hidden(user, id)) continue; + /* test for the post URL */ + if (strcmp(id, regex) == 0) { + if (xs_set_add(&seen, md5) == 1) + show--; + + continue; + } + xs *c = xs_str_new(NULL); const char *content = xs_dict_get(post, "content"); const char *name = xs_dict_get(post, "name"); |