commit c1bc0c7
default
·
2025-01-01 16:40:57 +0000 UTC
parent f72fbce
Fix for some repeated search results.
1 files changed,
+5,
-0
M
data.c
M
data.c
+5,
-0
1@@ -2742,6 +2742,11 @@ xs_list *content_search(snac *user, const char *regex,
2 if (id == NULL || is_hidden(user, id))
3 continue;
4
5+ /* recalculate the md5 id to be sure it's not repeated
6+ (it may have been searched by the "url" field instead of "id") */
7+ xs *new_md5 = xs_md5_hex(id, strlen(id));
8+ md5 = new_md5;
9+
10 /* test for the post URL */
11 if (strcmp(id, regex) == 0) {
12 if (xs_set_add(&seen, md5) == 1)