summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/data.c b/data.c
index e5ff089..cfd20fe 100644
--- a/data.c
+++ b/data.c
@@ -2486,12 +2486,14 @@ xs_list *content_search(snac *user, const char *regex,
2486 if (id == NULL || is_hidden(user, id)) 2486 if (id == NULL || is_hidden(user, id))
2487 continue; 2487 continue;
2488 2488
2489 xs *c = xs_str_new(NULL);
2489 const char *content = xs_dict_get(post, "content"); 2490 const char *content = xs_dict_get(post, "content");
2491 const char *name = xs_dict_get(post, "name");
2490 2492
2491 if (xs_is_null(content)) 2493 if (!xs_is_null(content))
2492 continue; 2494 c = xs_str_cat(c, content);
2493 2495 if (!xs_is_null(name))
2494 xs *c = xs_dup(content); 2496 c = xs_str_cat(c, " ", name);
2495 2497
2496 /* add alt-texts from attachments */ 2498 /* add alt-texts from attachments */
2497 const xs_list *atts = xs_dict_get(post, "attachment"); 2499 const xs_list *atts = xs_dict_get(post, "attachment");