Use named format parameter for alias/name templates

This commit is contained in:
Tulir Asokan
2018-01-28 12:23:22 +02:00
parent 6de82f10a0
commit 831851f118
4 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ class MatrixHandler:
self.log = log.getChild("mx")
self.commands = CommandHandler(context)
alias_format = self.config.get("bridge.alias_template", "telegram_{}").format("(.+)")
alias_format = self.config.get("bridge.alias_template", "telegram_{groupname}").format(groupname="(.+)")
hs = self.config["homeserver"]["domain"]
self.localpart_regex = re.compile(f"@{alias_format}:{hs}")