From dc5c1ce0ac7ef39864a2346bebc6e6ecdb519dc5 Mon Sep 17 00:00:00 2001 From: default Date: Mon, 24 Jul 2023 20:37:31 +0200 Subject: Added support for Accept objects that only provide an object id. This allows following Guppe groups. --- activitypub.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'activitypub.c') diff --git a/activitypub.c b/activitypub.c index 0b16f7d..27cf786 100644 --- a/activitypub.c +++ b/activitypub.c @@ -1512,7 +1512,7 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req) } else if (strcmp(type, "Accept") == 0) { /** **/ - if (strcmp(utype, "Follow") == 0) { /** **/ + if (strcmp(utype, "Follow") == 0 || strcmp(utype, "(null)") == 0) { /** **/ if (following_check(snac, actor)) { following_add(snac, actor, msg); snac_log(snac, xs_fmt("confirmed follow from %s", actor)); @@ -1520,8 +1520,10 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req) else snac_log(snac, xs_fmt("spurious follow accept from %s", actor)); } - else + else { + srv_archive_error("accept", "ignored Accept", req, msg); snac_debug(snac, 1, xs_fmt("ignored 'Accept' for object type '%s'", utype)); + } } else if (strcmp(type, "Like") == 0) { /** **/ -- cgit v1.2.3