From dbe60be4f3818336e7e91c6153fcf846303eed04 Mon Sep 17 00:00:00 2001 From: default Date: Wed, 2 Nov 2022 20:28:40 +0100 Subject: Fixed bug when following by @user@host. --- html.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'html.c') diff --git a/html.c b/html.c index a6d131d..afeb5df 100644 --- a/html.c +++ b/html.c @@ -1197,12 +1197,14 @@ int html_post_handler(d_char *req, char *q_path, d_char *payload, int p_size, if (strcmp(action, L("Follow")) == 0) { xs *msg = msg_follow(&snac, actor); - /* reload the actor from the message, in may be different */ - actor = xs_dict_get(msg, "object"); + if (msg != NULL) { + /* reload the actor from the message, in may be different */ + actor = xs_dict_get(msg, "object"); - following_add(&snac, actor, msg); + following_add(&snac, actor, msg); - enqueue_output(&snac, msg, actor, 0); + enqueue_output(&snac, msg, actor, 0); + } } else if (strcmp(action, L("Unfollow")) == 0) { -- cgit v1.2.3