diff options
author | default <nobody@localhost> | 2024-05-09 09:24:39 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2024-05-09 09:24:39 +0200 |
commit | 8de93b9cd72ef0cde8b5bb620f376e9b926354dd (patch) | |
tree | cba2cbb5058190a401ea47379f7b01c8de143de6 /data.c | |
parent | 2c8d4ce6bd227377fbfa02d92abdbff8a65150c3 (diff) |
mastoapi: some search by content tweaks.
Diffstat (limited to 'data.c')
-rw-r--r-- | data.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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"); |