-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Join rules and guest access #174
Conversation
Hi @zilo. Sorry about the delay; really low on time here. To answer questions:
Lmk if any other questions. Pinging @ara4n since this is a potential in case I |
Fix #158. Also add a new room attribute and tests.
Also add a new room attribute and tests.
Thanks a lot for your answers! Should be better now, I added tests and room attributes. |
@Zil0 is this ready to be reviewed? The title still says "WIP", so I wasn't sure. |
@non-Jedi it is, thanks for the heads-up |
Forgot to add: |
@@ -624,6 +625,24 @@ def modify_required_power_levels(self, events=None, **kwargs): | |||
except MatrixRequestError: | |||
return False | |||
|
|||
def set_invite_only(self, invite_only): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really think we should make this take a (fake) enum rather than a boolean
(change method name also obviously). That way if in the future knock
or
private
are used, we can accommodate that without changing the API for this
class. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to have something intuitive. As I understood it, the goal of those higher-level methods is to ease the use of the CS API, hence it didn't make sense to me to have basically the same method in room.py
and api.py
.
Also, I'm thinking that if knock
or private
are used, they will necessitate changes to this method anyway, so it may be good to wait to include them. And depending on what behavior they introduce, maybe it will make sense to have two different setters for the same underlying api call!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You convinced me. Thanks again!
Modulo that single comment, This LGTM. Thanks! |
Hello, aspiring GSoC student here :)
I tried to fix #158, and doing guest access too as the two events are related and very similar.
However I have some questions :
Thanks !