diff options
author | default <nobody@localhost> | 2024-04-11 19:29:30 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2024-04-11 19:29:30 +0200 |
commit | 46f2e324d8df49af914ba5781f13337dea7dd6aa (patch) | |
tree | db7abedc0387c039fd5b5bd315aef5b7a887309c /activitypub.c | |
parent | 1a9bb5fd076a78bd336fc65aac6ee01f468eb4bd (diff) |
Undo for Likes and Announces are no longer dropped.
Diffstat (limited to 'activitypub.c')
-rw-r--r-- | activitypub.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c index 9a23e14..d75bbdd 100644 --- a/activitypub.c +++ b/activitypub.c @@ -1941,6 +1941,8 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req) } else if (strcmp(type, "Undo") == 0) { /** **/ + char *id = xs_dict_get(object, "object"); + if (xs_type(object) != XSTYPE_DICT) utype = "Follow"; @@ -1953,6 +1955,18 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req) snac_log(snac, xs_fmt("error deleting follower %s", actor)); } else + if (strcmp(utype, "Like") == 0) { /** **/ + int status = object_unadmire(id, actor, 1); + + snac_log(snac, xs_fmt("Unlike for %s %d", id, status)); + } + else + if (strcmp(utype, "Announce") == 0) { /** **/ + int status = object_unadmire(id, actor, 0); + + snac_log(snac, xs_fmt("Unboost for %s %d", id, status)); + } + else snac_debug(snac, 1, xs_fmt("ignored 'Undo' for object type '%s'", utype)); } else |