Skip to content
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

Bug in use of rooms variable / access control to bot #8

Open
chrisfahr opened this issue Feb 28, 2018 · 2 comments
Open

Bug in use of rooms variable / access control to bot #8

chrisfahr opened this issue Feb 28, 2018 · 2 comments

Comments

@chrisfahr
Copy link

Hi,
there is an issue with your usage of the rooms variable.
In matrix_bot_api.py line 43 (else branch) you try to use it like an array of room objects.
This fails in line 46 when you try to assign handlers.
In the other branch you store (string) ids in it. Then again in line 71 you store objects.
This prevents one from using rooms in the constructor to limit access to the bot.

@shawnanastasio
Copy link
Owner

Good catch. I suppose I'll update all branches to treat them as an array of string room ids, unless you think room objects would be better?

@chrisfahr
Copy link
Author

chrisfahr commented Mar 16, 2018

I think using strings is fine.
Otherwise an user of the libary would have to call the underlying API to get the room objects,
which kind of contradicts the use case that he has in the first place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants