summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-11-08 09:20:34 +0100
committerdefault <nobody@localhost>2023-11-08 09:20:34 +0100
commit55d3ef5024d4a597ddeae23ca7d29375c7d6a9d3 (patch)
treea32a47d8085154fede0ca19a27a8e5043cf1cdf3 /data.c
parent895cf82a7d2b8704aeeabf002bc26a49336586ff (diff)
Tags can now be searched for from the server base URL.
Diffstat (limited to 'data.c')
-rw-r--r--data.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/data.c b/data.c
index 5026154..cd9c5e7 100644
--- a/data.c
+++ b/data.c
@@ -1575,7 +1575,6 @@ void tag_index(const char *id, const xs_dict *obj)
xs_list *tags = xs_dict_get(obj, "tag");
if (is_msg_public(obj) && xs_type(tags) == XSTYPE_LIST && xs_list_len(tags) > 0) {
- xs *md5_id = xs_md5_hex(id, strlen(id));
xs *g_tag_dir = xs_fmt("%s/tag", srv_basedir);
mkdirx(g_tag_dir);
@@ -1596,7 +1595,7 @@ void tag_index(const char *id, const xs_dict *obj)
mkdirx(tag_dir);
xs *g_tag_idx = xs_fmt("%s/%s.idx", tag_dir, md5_tag);
- index_add(g_tag_idx, md5_id);
+ index_add(g_tag_idx, id);
FILE *f;
xs *g_tag_name = xs_replace(g_tag_idx, ".idx", ".tag");
@@ -1605,7 +1604,7 @@ void tag_index(const char *id, const xs_dict *obj)
fclose(f);
}
- srv_debug(0, xs_fmt("tagged %s #%s (%s #%s)", id, name, md5_id, md5_tag));
+ srv_debug(0, xs_fmt("tagged %s #%s (#%s)", id, name, md5_tag));
}
}
}