lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

Fixing not being able to create comments on local community posts.

Open dessalines opened this issue 1 year ago • 2 comments

  • This was caused by not passing my_person_id into various CommentView::read functions. The visible_communities_only function 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?

dessalines avatar Jun 20 '24 16:06 dessalines

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.

Nutomic avatar Jun 21 '24 08:06 Nutomic

Okay this is done. I needed to refactor several views to receive the LocalUser, rather than the PersonId.

dessalines avatar Jun 21 '24 20:06 dessalines