mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 14:35:04 +00:00
New web action 'Follow'.
This commit is contained in:
parent
3797355f94
commit
1bb52559b2
1 changed files with 8 additions and 0 deletions
8
html.c
8
html.c
|
@ -867,6 +867,14 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (strcmp(action, L("Follow")) == 0) {
|
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
|
else
|
||||||
if (strcmp(action, L("Unfollow")) == 0) {
|
if (strcmp(action, L("Unfollow")) == 0) {
|
||||||
|
|
Loading…
Reference in a new issue