Conversation
Add allowed_channels feature
|
Basic testing resulted that it works. In channels, that are not listed in allowed_channels, the bot replies with: I may patch this for myself so it just ignores the message... |
|
This seems like a useful feature. And the code looks fine to me. I think the message about permission seems confusing. Technically it has nothing to do with permissions. I think the message should be something like "This bot is not allowed to be used in this channel". I am not sure why the unit tests are failing. Do you think you can figure that out or do you need help? |
|
Just FYI the unit test failure does not seem to be related to your changes. I am looking into it. I think this can go in as is. |
|
FYI I pushed a fix 013b852 for the unit test. You should be able to rebase and pass the checks. |
|
FYI: Im currently using my master with pip3 for bot development and it works, so im marking "Tested" as done. |
|
@aconitumnapellus Thanks for your contribution to this project. Glad you are finding it useful enough to enhance it 😃 |
As i need this for my personal instance, i decided to try and implement a filter for channels.
The reason is that i dont want the bot to work in every channel.
I just took the allowed_users filter and adapted it to channels, i didnt test it yet.
TODO: