diff options
author | default <nobody@localhost> | 2024-01-05 17:37:36 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2024-01-05 17:37:36 +0100 |
commit | 8800ed38928312d6c8e642c580410266ea045a0f (patch) | |
tree | 6c2f0e3c1d4733bb9606571134dbbb07ab6c11f5 /activitypub.c | |
parent | 5e2f4e9902c5ae15bd55da99a28b1de61a6f4293 (diff) |
More tweaks regarding shared inboxes.
Diffstat (limited to 'activitypub.c')
-rw-r--r-- | activitypub.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/activitypub.c b/activitypub.c index b658fbc..35601fb 100644 --- a/activitypub.c +++ b/activitypub.c @@ -1670,8 +1670,10 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req) } else if (strcmp(type, "Create") == 0) { /** **/ - if (is_muted(snac, actor)) + if (is_muted(snac, actor)) { snac_log(snac, xs_fmt("ignored 'Create' + '%s' from muted actor %s", utype, actor)); + return 1; + } if (strcmp(utype, "Note") == 0) { /** **/ char *id = xs_dict_get(object, "id"); @@ -1751,6 +1753,9 @@ 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 (is_muted(snac, actor) && !xs_startswith(object, snac->actor)) + snac_log(snac, xs_fmt("dropped 'Announce' from muted actor %s", actor)); + else if (is_limited(snac, actor) && !xs_startswith(object, snac->actor)) snac_log(snac, xs_fmt("dropped 'Announce' from limited actor %s", actor)); else { |