mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 05:15:04 +00:00
Minor search improvement.
This commit is contained in:
parent
3663c816a3
commit
3dbeee863e
1 changed files with 6 additions and 4 deletions
10
data.c
10
data.c
|
@ -2486,12 +2486,14 @@ xs_list *content_search(snac *user, const char *regex,
|
|||
if (id == NULL || is_hidden(user, id))
|
||||
continue;
|
||||
|
||||
xs *c = xs_str_new(NULL);
|
||||
const char *content = xs_dict_get(post, "content");
|
||||
const char *name = xs_dict_get(post, "name");
|
||||
|
||||
if (xs_is_null(content))
|
||||
continue;
|
||||
|
||||
xs *c = xs_dup(content);
|
||||
if (!xs_is_null(content))
|
||||
c = xs_str_cat(c, content);
|
||||
if (!xs_is_null(name))
|
||||
c = xs_str_cat(c, " ", name);
|
||||
|
||||
/* add alt-texts from attachments */
|
||||
const xs_list *atts = xs_dict_get(post, "attachment");
|
||||
|
|
Loading…
Reference in a new issue