mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-26 01:03:37 +00:00
content_search() also checks for the post id.
This commit is contained in:
parent
e9f3d5120c
commit
844825f190
1 changed files with 8 additions and 0 deletions
8
data.c
8
data.c
|
@ -2742,6 +2742,14 @@ xs_list *content_search(snac *user, const char *regex,
|
||||||
if (id == NULL || is_hidden(user, id))
|
if (id == NULL || is_hidden(user, id))
|
||||||
continue;
|
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);
|
xs *c = xs_str_new(NULL);
|
||||||
const char *content = xs_dict_get(post, "content");
|
const char *content = xs_dict_get(post, "content");
|
||||||
const char *name = xs_dict_get(post, "name");
|
const char *name = xs_dict_get(post, "name");
|
||||||
|
|
Loading…
Reference in a new issue