diff options
author | default <nobody@localhost> | 2022-09-27 15:38:09 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2022-09-27 15:38:09 +0200 |
commit | 8ac32f0d8186dcac832b131cb9f322f6655014f3 (patch) | |
tree | 56114a4ffe33686ec74a53151bda3bcf6366f3fd /activitypub.c | |
parent | 05bf4b2c3c9888ab8830e8f4bbe73e8ad4538760 (diff) |
'Accept' messages are processed.
Diffstat (limited to 'activitypub.c')
-rw-r--r-- | activitypub.c | 12 |
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) snac_debug(snac, 1, xs_fmt("ignored 'Create' for object type '%s'", utype)); } else -/* if (strcmp(type, "Accept") == 0) { + if (strcmp(utype, "Follow") == 0) { + if (following_check(snac, actor)) { + following_add(snac, actor, msg); + snac_log(snac, xs_fmt("confirmed follow from %s", actor)); + } + else + snac_log(snac, xs_fmt("spurious follow accept from %s", actor)); + } + else + snac_debug(snac, 1, xs_fmt("ignored 'Accept' for object type '%s'", utype)); } else -*/ if (strcmp(type, "Like") == 0) { if (xs_type(object) == XSTYPE_DICT) object = xs_dict_get(object, "id"); |