commit 78bd026

default  ·  2025-02-14 09:08:26 +0000 UTC
parent 02bc18e
html_footer() now receives an optional snac *user argument.
1 files changed,  +5, -7
M html.c
M html.c
+5, -7
 1@@ -2585,10 +2585,8 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
 2 }
 3 
 4 
 5-xs_html *html_footer(void)
 6+xs_html *html_footer(const snac *user)
 7 {
 8-    const snac *user = NULL;
 9-
10     return xs_html_tag("div",
11         xs_html_attr("class", "snac-footer"),
12         xs_html_tag("a",
13@@ -2895,7 +2893,7 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only,
14     }
15 
16     xs_html_add(body,
17-        html_footer());
18+        html_footer(user));
19 
20     return xs_html_render_s(html, "<!DOCTYPE html>\n");
21 }
22@@ -3064,7 +3062,7 @@ xs_str *html_people(snac *user)
23         html_user_head(user, NULL, NULL),
24         xs_html_add(html_user_body(user, 0),
25             lists,
26-            html_footer()));
27+            html_footer(user)));
28 
29     return xs_html_render_s(html, "<!DOCTYPE html>\n");
30 }
31@@ -3314,7 +3312,7 @@ xs_str *html_notifications(snac *user, int skip, int show)
32     xs_set_free(&rep);
33 
34     xs_html_add(body,
35-        html_footer());
36+        html_footer(user));
37 
38     /* set the check time to now */
39     xs *dummy = notify_check_time(user, 1);
40@@ -3569,7 +3567,7 @@ int html_get_handler(const xs_dict *req, const char *q_path,
41                         html_user_head(&snac, NULL, NULL),
42                         xs_html_add(html_user_body(&snac, 0),
43                         page,
44-                        html_footer()));
45+                        html_footer(user)));
46 
47                     *body = xs_html_render_s(html, "<!DOCTYPE html>\n");
48                     *b_size = strlen(*body);