Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Refactor the checking restricted join rules #10009

Closed
wants to merge 3 commits into from

Conversation

clokep
Copy link
Member

@clokep clokep commented May 18, 2021

This is another bit split out of #9922 and builds on #10007. This performs the refactoring used by #9922 in the EventAuthHandler separately.

)
return result

async def is_user_in_rooms(self, room_ids: Collection[str], user_id: str) -> bool:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find a method on any of the handlers / stores that lets you check if a user is in a room already, arguably this might be better on the RoomMemberHandler or something, but it is convenient for the EventAuthHandler to have no dependencies.

@clokep
Copy link
Member Author

clokep commented May 18, 2021

(I'm not 100% convinced this PR makes sense outside of #9922 now as it is hard to see that there will be other callers of these methods. We can abandon this and merge into #9922 if that's clearer.)

@erikjohnston
Copy link
Member

Thanks for this, it was actually helpful seeing it split up. I ended up referring back to #9922 to figure out how it was used in other places so I ended up just leaving comments there instead.

@clokep clokep deleted the clokep/check-restricted-join-rules-2 branch May 19, 2021 11:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants