From 8de93b9cd72ef0cde8b5bb620f376e9b926354dd Mon Sep 17 00:00:00 2001 From: default Date: Thu, 9 May 2024 09:24:39 +0200 Subject: mastoapi: some search by content tweaks. --- data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data.c') diff --git a/data.c b/data.c index d9449d8..75149e2 100644 --- a/data.c +++ b/data.c @@ -10,6 +10,7 @@ #include "xs_set.h" #include "xs_time.h" #include "xs_regex.h" +#include "xs_match.h" #include "snac.h" @@ -2570,8 +2571,7 @@ xs_list *content_search(snac *user, const char *regex, int priv, int max_secs, i if (!valid_status(timeline_get_by_md5(user, md5, &post))) continue; - /* must be a Note */ - if (strcmp(xs_dict_get_def(post, "type", ""), "Note")) + if (!xs_match(xs_dict_get_def(post, "type", "-"), "Note|Question|Page|Article|Video")) continue; char *content = xs_dict_get(post, "content"); -- cgit v1.2.3