From 1bb52559b2de8d896ad2e3a4c2fd4207c460733f Mon Sep 17 00:00:00 2001 From: default Date: Sat, 1 Oct 2022 08:05:20 +0200 Subject: [PATCH] New web action 'Follow'. --- html.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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) {