commit 844825f
default
·
2024-12-19 03:24:25 +0000 UTC
parent e9f3d51
content_search() also checks for the post id.
1 files changed,
+8,
-0
M
data.c
M
data.c
+8,
-0
1@@ -2742,6 +2742,14 @@ xs_list *content_search(snac *user, const char *regex,
2 if (id == NULL || is_hidden(user, id))
3 continue;
4
5+ /* test for the post URL */
6+ if (strcmp(id, regex) == 0) {
7+ if (xs_set_add(&seen, md5) == 1)
8+ show--;
9+
10+ continue;
11+ }
12+
13 xs *c = xs_str_new(NULL);
14 const char *content = xs_dict_get(post, "content");
15 const char *name = xs_dict_get(post, "name");