lemmy
lemmy copied to clipboard
Fixing not being able to create comments on local community posts.
- This was caused by not passing my_person_id into various
CommentView::readfunctions. Thevisible_communities_onlyfunction only allows you to view local communities if my_person is passed. - Fixes #4853
@dullbananas logically that check doesn't make sense to me. Should the visible_communities_only function be checking for a local_user_id, since those are local only, not a person_id, which could be a federated person?
Yes checking with LocalUser or LocalUserId would make more sense. I dont think its a problem in practice because remote users cannot call the api (as evidenced by using local_user_view for these calls), and I dont think this check is used for federation. Still better to change it.
Okay this is done. I needed to refactor several views to receive the LocalUser, rather than the PersonId.