commit 23828b5

grunfink  ·  2026-09-10 14:08:44 +0000 UTC
parent f80614b
Added web UI to mark/unmark users as cool.
1 files changed,  +17, -0
M html.c
M html.c
+17, -0
 1@@ -4093,6 +4093,15 @@ xs_html *html_people_list(snac *user, xs_list *list, const char *header, const c
 2                         html_button("delete", L("Delete"), L("Delete this user")));
 3             }
 4 
 5+            if (cool(user, actor_id, OP_CHECK))
 6+                xs_html_add(form,
 7+                    html_button("uncool", L("Not cool"),
 8+                        L("No longer notify me whenever this user posts")));
 9+            else
10+                xs_html_add(form,
11+                     html_button("cool", L("Cool"),
12+                             L("Notify me whenever this users posts")));
13+
14             if (pending_check(user, actor_id)) {
15                 xs_html_add(form,
16                     html_button("approve", L("Approve"),
17@@ -5937,6 +5946,14 @@ int html_post_handler(const xs_dict *req, const char *q_path,
18             unlimit(&snac, actor);
19         }
20         else
21+        if (strcmp(action, L("Cool")) == 0) { /** **/
22+            cool(&snac, actor, OP_ADD);
23+        }
24+        else
25+        if (strcmp(action, L("Not cool")) == 0) { /** **/
26+            cool(&snac, actor, OP_DEL);
27+        }
28+        else
29         if (strcmp(action, L("Follow")) == 0) { /** **/
30             xs *msg = msg_follow(&snac, actor);
31