diff options
author | default <nobody@localhost> | 2024-05-02 07:25:22 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2024-05-02 07:25:22 +0200 |
commit | 528f6463b2347fb5da3f41f8aac37c8c9168ea63 (patch) | |
tree | 66b7322067c62e5366a28ecde614fa212746567f | |
parent | 6a77c634ad9938744bae6d718b209557fa37018c (diff) |
Fixed confusion in Undo + Follow processing.
-rw-r--r-- | activitypub.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/activitypub.c b/activitypub.c index 2691a6a..a8a7db7 100644 --- a/activitypub.c +++ b/activitypub.c @@ -1947,12 +1947,16 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req) utype = "Follow"; if (strcmp(utype, "Follow") == 0) { /** **/ - if (valid_status(follower_del(snac, actor))) { - snac_log(snac, xs_fmt("no longer following us %s", actor)); - do_notify = 1; + if (id && strcmp(id, snac->actor) != 0) + snac_debug(snac, 1, xs_fmt("Undo + Follow from %s not for us (%s)", actor, id)); + else { + if (valid_status(follower_del(snac, actor))) { + snac_log(snac, xs_fmt("no longer following us %s", actor)); + do_notify = 1; + } + else + snac_log(snac, xs_fmt("error deleting follower %s", actor)); } - else - snac_log(snac, xs_fmt("error deleting follower %s", actor)); } else if (strcmp(utype, "Like") == 0) { /** **/ |