From ad718e5b801edd19fd76fb7d2921533c21ffab38 Mon Sep 17 00:00:00 2001 From: default Date: Sun, 17 Dec 2023 14:56:09 +0100 Subject: [PATCH] Fixed shared inbox distribution logic for Delete messages. --- activitypub.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/activitypub.c b/activitypub.c index 732aaac..130c283 100644 --- a/activitypub.c +++ b/activitypub.c @@ -1526,7 +1526,7 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req) if (xs_type(obj_id) == XSTYPE_DICT) obj_id = xs_dict_get(obj_id, "id"); - if (object_here(obj_id)) { + if (!object_here(obj_id)) { srv_debug(1, xs_fmt("dropped 'Delete' message from unknown object '%s'", obj_id)); return -1; } @@ -1778,8 +1778,10 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req) if (xs_type(object) == XSTYPE_DICT) object = xs_dict_get(object, "id"); - if (valid_status(timeline_del(snac, object))) + if (object_here(object)) { + timeline_del(snac, object); snac_debug(snac, 1, xs_fmt("new 'Delete' %s %s", actor, object)); + } else snac_debug(snac, 1, xs_fmt("ignored 'Delete' for unknown object %s", object)); }