aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordefault <nobody@localhost>2024-12-19 05:19:04 +0100
committerdefault <nobody@localhost>2024-12-19 05:19:04 +0100
commit103dc7d4f2ba729737fd0ca768146247022a4b59 (patch)
tree6ee98219847cb4f557e84d456313611c23ec9ff8
parent7b8f766feb35629c7db6e9392dbe9de2dd6f7239 (diff)
In content_search(), also test the 'url' post field (if it exists).
-rw-r--r--data.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/data.c b/data.c
index 038d7fd..f9dd76b 100644
--- a/data.c
+++ b/data.c
@@ -2750,6 +2750,15 @@ xs_list *content_search(snac *user, const char *regex,
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);
const char *content = xs_dict_get(post, "content");
const char *name = xs_dict_get(post, "name");