pleroma/test
Oneric 2a55239ca8
mrf/object_age: fix handling of non-public objects
Current logic unconditionally adds public adressing to "cc"
and follower adressing to "to" after attempting to strip it
from the other one. This creates serious problems:

First the bug prompting this investigation and fix,
unconditional addition creates duplicates when adressing
URIs already were in their intended final field; e.g.
this is prominently the case for all "unlisted" posts.
Since List.delete only removes the first occurence,
this then broke follower-adress stripping later on
making the policy ineffective.

It’s also just not safe in general wrt to non-public adressing:
e.g. pre-existing duplicates didn’t get fully stripped,
bespoke adressing modes with only one of public addressing
or follower addressing are mangled — and most importantly:
any belatedly received DM or follower-only post
also got public adressing added!
Shockingly this last point was actually asserted as "correct" in tests;
it appears to be a mistake from mindless match adjustments
while fixing crashes on nil adressing in
10c792110e.

Clean up this sloppy logic up, making sure no more duplicates are
added by us, all instances of relevant adresses are purged and only
readded when they actually existed to begin with.

(cherry picked from commit 932810c35ecba9d11fa4f11112c3444b62c45b65)
2026-10-27 12:27:09 +04:00
..
config Load an emoji.txt specific to the test env 2021-02-03 16:40:59 -06:00
credo/check/consistency
fixtures Merge branch 'develop' into paradedb-search-backend 2026-07-26 09:15:42 +00:00
instance_static
mix fix(webhooks): merge develop and harden delivery 2026-07-26 17:00:14 +04:00
pleroma mrf/object_age: fix handling of non-public objects 2026-10-27 12:27:09 +04:00
support Merge branch 'develop' into paradedb-search-backend 2026-05-14 09:24:51 +00:00
test_helper.exs Add ParadeDB docker integration test 2026-03-03 12:36:01 +04:00