snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit ad718e5b801edd19fd76fb7d2921533c21ffab38
parent f93b5ad0910feea24e88cebb9e4214ec5b24b4e3
Author: default <nobody@localhost>
Date:   Sun, 17 Dec 2023 14:56:09 +0100

Fixed shared inbox distribution logic for Delete messages.

Diffstat:
Mactivitypub.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 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)); }