summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-10-01 08:05:20 +0200
committerdefault <nobody@localhost>2022-10-01 08:05:20 +0200
commit1bb52559b2de8d896ad2e3a4c2fd4207c460733f (patch)
tree9ecf76c07fb84b18705248ac0c937f2b21dfb7bc /html.c
parent3797355f943d5e2ece5a4ed6c153c295c19f1734 (diff)
New web action 'Follow'.
Diffstat (limited to 'html.c')
-rw-r--r--html.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/html.c b/html.c
index f2f8b33..4e60903 100644
--- a/html.c
+++ b/html.c
@@ -867,6 +867,14 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
}
else
if (strcmp(action, L("Follow")) == 0) {
+ char *msg = msg_follow(&snac, actor);
+
+ /* reload the actor from the message, in may be different */
+ actor = xs_dict_get(msg, "object");
+
+ following_add(&snac, actor, msg);
+
+ enqueue_output(&snac, msg, actor, 0);
}
else
if (strcmp(action, L("Unfollow")) == 0) {