diff options
| author | 2023-07-24 20:37:31 +0200 | |
|---|---|---|
| committer | 2023-07-24 20:37:31 +0200 | |
| commit | dc5c1ce0ac7ef39864a2346bebc6e6ecdb519dc5 (patch) | |
| tree | fa9c440245d740ce041e3dc36f02c88456ec2f1e /activitypub.c | |
| parent | Merge pull request 'Major rollback & Put "User Settings" outside of "Operatio... (diff) | |
| download | snac2-dc5c1ce0ac7ef39864a2346bebc6e6ecdb519dc5.tar.gz snac2-dc5c1ce0ac7ef39864a2346bebc6e6ecdb519dc5.tar.xz snac2-dc5c1ce0ac7ef39864a2346bebc6e6ecdb519dc5.zip | |
Added support for Accept objects that only provide an object id.
This allows following Guppe groups.
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 6 |
1 files changed, 4 insertions, 2 deletions
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) | |||
| 1512 | } | 1512 | } |
| 1513 | else | 1513 | else |
| 1514 | if (strcmp(type, "Accept") == 0) { /** **/ | 1514 | if (strcmp(type, "Accept") == 0) { /** **/ |
| 1515 | if (strcmp(utype, "Follow") == 0) { /** **/ | 1515 | if (strcmp(utype, "Follow") == 0 || strcmp(utype, "(null)") == 0) { /** **/ |
| 1516 | if (following_check(snac, actor)) { | 1516 | if (following_check(snac, actor)) { |
| 1517 | following_add(snac, actor, msg); | 1517 | following_add(snac, actor, msg); |
| 1518 | snac_log(snac, xs_fmt("confirmed follow from %s", actor)); | 1518 | 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) | |||
| 1520 | else | 1520 | else |
| 1521 | snac_log(snac, xs_fmt("spurious follow accept from %s", actor)); | 1521 | snac_log(snac, xs_fmt("spurious follow accept from %s", actor)); |
| 1522 | } | 1522 | } |
| 1523 | else | 1523 | else { |
| 1524 | srv_archive_error("accept", "ignored Accept", req, msg); | ||
| 1524 | snac_debug(snac, 1, xs_fmt("ignored 'Accept' for object type '%s'", utype)); | 1525 | snac_debug(snac, 1, xs_fmt("ignored 'Accept' for object type '%s'", utype)); |
| 1526 | } | ||
| 1525 | } | 1527 | } |
| 1526 | else | 1528 | else |
| 1527 | if (strcmp(type, "Like") == 0) { /** **/ | 1529 | if (strcmp(type, "Like") == 0) { /** **/ |