LemmyNet / lemmy

🐀 A link aggregator and forum for the fediverse
https://join-lemmy.org
GNU Affero General Public License v3.0
12.95k stars 859 forks source link

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

Open dessalines opened 2 weeks ago

dessalines commented 2 weeks ago

@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?

Nutomic commented 2 weeks ago

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.

dessalines commented 2 weeks ago

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