diff options
author | default <nobody@localhost> | 2022-10-01 08:05:20 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2022-10-01 08:05:20 +0200 |
commit | 1bb52559b2de8d896ad2e3a4c2fd4207c460733f (patch) | |
tree | 9ecf76c07fb84b18705248ac0c937f2b21dfb7bc /html.c | |
parent | 3797355f943d5e2ece5a4ed6c153c295c19f1734 (diff) |
New web action 'Follow'.
Diffstat (limited to 'html.c')
-rw-r--r-- | html.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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) { |