diff options
| author | 2024-05-02 07:25:22 +0200 | |
|---|---|---|
| committer | 2024-05-02 07:25:22 +0200 | |
| commit | 528f6463b2347fb5da3f41f8aac37c8c9168ea63 (patch) | |
| tree | 66b7322067c62e5366a28ecde614fa212746567f | |
| parent | Also add announces to lists. (diff) | |
| download | snac2-528f6463b2347fb5da3f41f8aac37c8c9168ea63.tar.gz snac2-528f6463b2347fb5da3f41f8aac37c8c9168ea63.tar.xz snac2-528f6463b2347fb5da3f41f8aac37c8c9168ea63.zip | |
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) | |||
| 1947 | utype = "Follow"; | 1947 | utype = "Follow"; |
| 1948 | 1948 | ||
| 1949 | if (strcmp(utype, "Follow") == 0) { /** **/ | 1949 | if (strcmp(utype, "Follow") == 0) { /** **/ |
| 1950 | if (valid_status(follower_del(snac, actor))) { | 1950 | if (id && strcmp(id, snac->actor) != 0) |
| 1951 | snac_log(snac, xs_fmt("no longer following us %s", actor)); | 1951 | snac_debug(snac, 1, xs_fmt("Undo + Follow from %s not for us (%s)", actor, id)); |
| 1952 | do_notify = 1; | 1952 | else { |
| 1953 | if (valid_status(follower_del(snac, actor))) { | ||
| 1954 | snac_log(snac, xs_fmt("no longer following us %s", actor)); | ||
| 1955 | do_notify = 1; | ||
| 1956 | } | ||
| 1957 | else | ||
| 1958 | snac_log(snac, xs_fmt("error deleting follower %s", actor)); | ||
| 1953 | } | 1959 | } |
| 1954 | else | ||
| 1955 | snac_log(snac, xs_fmt("error deleting follower %s", actor)); | ||
| 1956 | } | 1960 | } |
| 1957 | else | 1961 | else |
| 1958 | if (strcmp(utype, "Like") == 0) { /** **/ | 1962 | if (strcmp(utype, "Like") == 0) { /** **/ |