snac2

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

commit 135e690a27cd315653a3df93adcaf7d35fb07e0a
parent a3f1387daaaa15253a242876aa0e9e4639e8e23d
Author: default <nobody@localhost>
Date:   Mon,  7 Aug 2023 19:21:57 +0200

Limited users can announce our own posts.

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

diff --git a/activitypub.c b/activitypub.c @@ -1558,15 +1558,15 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req) } else if (strcmp(type, "Announce") == 0) { /** **/ - if (is_limited(snac, actor)) + if (xs_type(object) == XSTYPE_DICT) + object = xs_dict_get(object, "id"); + + if (is_limited(snac, actor) && !xs_startswith(object, snac->actor)) snac_log(snac, xs_fmt("dropped 'Announce' from limited actor %s", actor)); else { xs *a_msg = NULL; xs *wrk = NULL; - if (xs_type(object) == XSTYPE_DICT) - object = xs_dict_get(object, "id"); - timeline_request(snac, &object, &wrk, 0); if (valid_status(object_get(object, &a_msg))) {