diff options
author | default <nobody@localhost> | 2023-12-17 14:56:09 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2023-12-17 14:56:09 +0100 |
commit | ad718e5b801edd19fd76fb7d2921533c21ffab38 (patch) | |
tree | 98aade327dcd0df4a2632061d58bfae1553cfc4f | |
parent | f93b5ad0910feea24e88cebb9e4214ec5b24b4e3 (diff) |
Fixed shared inbox distribution logic for Delete messages.
-rw-r--r-- | activitypub.c | 6 |
1 files 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)); } |