summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2022-09-27 15:38:09 +0200
committerGravatar default2022-09-27 15:38:09 +0200
commit8ac32f0d8186dcac832b131cb9f322f6655014f3 (patch)
tree56114a4ffe33686ec74a53151bda3bcf6366f3fd
parentNew function msg_follow(). (diff)
downloadsnac2-8ac32f0d8186dcac832b131cb9f322f6655014f3.tar.gz
snac2-8ac32f0d8186dcac832b131cb9f322f6655014f3.tar.xz
snac2-8ac32f0d8186dcac832b131cb9f322f6655014f3.zip
'Accept' messages are processed.
-rw-r--r--activitypub.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c
index 3ea05f5..edb32c7 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -549,11 +549,19 @@ void process_message(snac *snac, char *msg, char *req)
549 snac_debug(snac, 1, xs_fmt("ignored 'Create' for object type '%s'", utype)); 549 snac_debug(snac, 1, xs_fmt("ignored 'Create' for object type '%s'", utype));
550 } 550 }
551 else 551 else
552/*
553 if (strcmp(type, "Accept") == 0) { 552 if (strcmp(type, "Accept") == 0) {
553 if (strcmp(utype, "Follow") == 0) {
554 if (following_check(snac, actor)) {
555 following_add(snac, actor, msg);
556 snac_log(snac, xs_fmt("confirmed follow from %s", actor));
557 }
558 else
559 snac_log(snac, xs_fmt("spurious follow accept from %s", actor));
560 }
561 else
562 snac_debug(snac, 1, xs_fmt("ignored 'Accept' for object type '%s'", utype));
554 } 563 }
555 else 564 else
556*/
557 if (strcmp(type, "Like") == 0) { 565 if (strcmp(type, "Like") == 0) {
558 if (xs_type(object) == XSTYPE_DICT) 566 if (xs_type(object) == XSTYPE_DICT)
559 object = xs_dict_get(object, "id"); 567 object = xs_dict_get(object, "id");