Support room alias supplied via channel arg

This commit is contained in:
Ben 2020-04-03 16:41:11 +02:00
parent 9b41ab82a0
commit 06317d9430
Signed by: ben
GPG key ID: 0F54A7ED232D3319

4
wmn.py
View file

@ -13,8 +13,8 @@ from matrix_client.errors import MatrixRequestError
application = Flask(__name__)
# Not going to care for specifics like the underscore.
# Generally match !anything:example.com with unicode support.
room_pattern = re.compile(r'^!\w+:[\w\-.]+$')
# Generally match room alias or id [!#]anything:example.com with unicode support.
room_pattern = re.compile(r'^[!#]\w+:[\w\-.]+$')
"""
config.yml Example: