diff options
| author | 2022-11-02 20:28:40 +0100 | |
|---|---|---|
| committer | 2022-11-02 20:28:40 +0100 | |
| commit | dbe60be4f3818336e7e91c6153fcf846303eed04 (patch) | |
| tree | 13f52fe3a0f8eecb9ee3ba984a76eabf829d8c17 /html.c | |
| parent | Added the published (actor create) data to the 'people' page. (diff) | |
| download | snac2-dbe60be4f3818336e7e91c6153fcf846303eed04.tar.gz snac2-dbe60be4f3818336e7e91c6153fcf846303eed04.tar.xz snac2-dbe60be4f3818336e7e91c6153fcf846303eed04.zip | |
Fixed bug when following by @user@host.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 10 |
1 files changed, 6 insertions, 4 deletions
| @@ -1197,12 +1197,14 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size, | |||
| 1197 | if (strcmp(action, L("Follow")) == 0) { | 1197 | if (strcmp(action, L("Follow")) == 0) { |
| 1198 | xs *msg = msg_follow(&snac, actor); | 1198 | xs *msg = msg_follow(&snac, actor); |
| 1199 | 1199 | ||
| 1200 | /* reload the actor from the message, in may be different */ | 1200 | if (msg != NULL) { |
| 1201 | actor = xs_dict_get(msg, "object"); | 1201 | /* reload the actor from the message, in may be different */ |
| 1202 | actor = xs_dict_get(msg, "object"); | ||
| 1202 | 1203 | ||
| 1203 | following_add(&snac, actor, msg); | 1204 | following_add(&snac, actor, msg); |
| 1204 | 1205 | ||
| 1205 | enqueue_output(&snac, msg, actor, 0); | 1206 | enqueue_output(&snac, msg, actor, 0); |
| 1207 | } | ||
| 1206 | } | 1208 | } |
| 1207 | else | 1209 | else |
| 1208 | if (strcmp(action, L("Unfollow")) == 0) { | 1210 | if (strcmp(action, L("Unfollow")) == 0) { |