Commit Graph

6 Commits

Author SHA1 Message Date
ilja 1f863f0a36 Fix MRF policies to also work with Update
ci/woodpecker/pr/woodpecker Pipeline failed Details
Objects who got updated would just pass through several of the MRF policies, undoing moderation in some situations.
In the relevant cases we now check not only for Create activities, but also Update activities.

I checked which ones checked explicitly on type Create using `grep '"type" => "Create"' lib/pleroma/web/activity_pub/mrf/*`.

The following from that list have not been changed:
* lib/pleroma/web/activity_pub/mrf/follow_bot_policy.ex
    * Not relevant for moderation
* lib/pleroma/web/activity_pub/mrf/keyword_policy.ex
    * Already had a test for Update
* lib/pleroma/web/activity_pub/mrf/object_age_policy.ex
    * In practice only relevant when fetching old objects (e.g. through Like or Announce). These are always wrapped in a Create.
* lib/pleroma/web/activity_pub/mrf/reject_non_public.ex
    * We don't allow changing scope with Update, so not relevant here
2022-12-08 23:22:05 +01:00
Alex Gleason fe4c4a7178
MRF: create MRF.Policy behaviour separate from MRF module
Speeds up recompilation by reducing compile-time deps
2021-06-07 14:22:08 -05:00
Haelwenn (lanodan) Monnier c4439c630f
Bump Copyright to 2021
grep -rl '# Copyright © .* Pleroma' * | xargs sed -i 's;Copyright © .* Pleroma .*;Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>;'
2021-01-13 07:49:50 +01:00
Alibek Omarov 95688c90ad ForceBotUnlistedPolicy: simplify code 2020-09-08 01:15:15 +02:00
Alibek Omarov 8b695c3eeb ForceBotUnlistedPolicy: format 2020-09-07 22:53:45 +02:00
Alibek Omarov 699224a900 ForceBotUnlistedPolicy: initial add, tiny clean up from my previous version 2020-09-07 22:15:42 +02:00