commit dc5c1ce0ac7ef39864a2346bebc6e6ecdb519dc5
parent 1882c25a179273510312b2341dbdff8b74df5e3c
Author: default <nobody@localhost>
Date: Mon, 24 Jul 2023 20:37:31 +0200
Added support for Accept objects that only provide an object id.
This allows following Guppe groups.
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git 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) { /** **/