mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-26 01:03:37 +00:00
In content_search(), also test the 'url' post field (if it exists).
This commit is contained in:
parent
7b8f766feb
commit
103dc7d4f2
1 changed files with 9 additions and 0 deletions
9
data.c
9
data.c
|
@ -2750,6 +2750,15 @@ xs_list *content_search(snac *user, const char *regex,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* test for the alternate post id */
|
||||||
|
const char *url = xs_dict_get(post, "url");
|
||||||
|
if (!xs_is_null(url) && strcmp(url, 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