pleroma/test
Oneric 59fcb5c96e
api: ensure only visible posts are interactable
Port of Akkoma PR 1014 with a few changes:
- comments regarding akkomafe changed to Pleroma-FE when applicable
- different error message for replying to/interacting with invisible post
  in Pleroma.Web.CommonAPI.ActivityDraft.in_reply_to/1
- split "doesn't do funny things to other users favs" test into three:
  - can't unfavourite post that isn't favourited
  - can't unfavourite other user's favs
  - can't unfavourite other user's favs using their activity
- switched order of args for some CommonAPI function since Akkoma hasn't
  backported our old change for that

Pleroma.Web.CommonAPI.ActivityDraft.in_reply_to/1 now refactored to use
`with` statement as in Akkoma. Some defp in_reply_to/1 were therefore removed

Original PR author: Oneric
Original commit message:
It doesn't make sense to like, react, reply, etc to something you cannot
see and is unexpected for the author of the interacted with post and
might make them believe the reacting user actually _can_ see the post.

Wrt to fav, reblog, reaction indexes the missing visibility check was
also leaking some (presumably/hopefully) low-severity data.

Add full-API test for all modes of interactions with private posts.
2025-12-11 23:30:02 +01:00
..
config Load an emoji.txt specific to the test env 2021-02-03 16:40:59 -06:00
credo/check/consistency Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
fixtures MRF InlineQuotePolicy: Don't inline quoted post URL in Mastodon quotes 2025-11-29 18:12:32 +01:00
instance_static support for special chars in pack name 2020-09-24 09:12:37 +03:00
mix Fix test for mix task 2025-07-22 15:21:20 -07:00
pleroma api: ensure only visible posts are interactable 2025-12-11 23:30:02 +01:00
support PublisherTest: Mock -> Mox 2025-09-05 15:04:33 +04:00
test_helper.exs Elixir 1.18 Deal with :warnings_as_errors deprecation in compiler_options/1 2025-05-13 14:02:47 +02:00