commit 38ee86f

default  ·  2023-07-04 15:15:38 +0000 UTC
parent 7e5b02b
Also call process_tags() when in the public timeline's bio.
2 files changed,  +6, -2
M html.c
M snac.h
M html.c
+4, -2
 1@@ -362,8 +362,10 @@ d_char *html_user_header(snac *snac, d_char *s, int local)
 2         s = xs_str_cat(s, s1);
 3 
 4         if (local) {
 5-            xs *bio = not_really_markdown(xs_dict_get(snac->config, "bio"), NULL);
 6-            xs *s1  = xs_fmt("<div class=\"p-note snac-top-user-bio\">%s</div>\n", bio);
 7+            xs *bio1 = not_really_markdown(xs_dict_get(snac->config, "bio"), NULL);
 8+            xs *tags = xs_list_new();
 9+            xs *bio2 = process_tags(snac, bio1, &tags);
10+            xs *s1   = xs_fmt("<div class=\"p-note snac-top-user-bio\">%s</div>\n", bio2);
11 
12             s = xs_str_cat(s, s1);
13         }
M snac.h
+2, -0
1@@ -207,6 +207,8 @@ int webfinger_get_handler(xs_dict *req, char *q_path,
2 
3 const char *default_avatar_base64(void);
4 
5+xs_str *process_tags(snac *snac, const char *content, xs_list **tag);
6+
7 xs_dict *msg_admiration(snac *snac, char *object, char *type);
8 xs_dict *msg_create(snac *snac, const xs_dict *object);
9 xs_dict *msg_follow(snac *snac, const char *actor);