From 715dedb4f76b142247be755e38d46567f2a7c487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20B=C3=BCchner?= Date: Sat, 13 Apr 2024 07:43:43 +0200 Subject: [PATCH] fix {moderators} replacement in fact --- ubottu/bot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ubottu/bot.py b/ubottu/bot.py index 993d77e..0e9c764 100644 --- a/ubottu/bot.py +++ b/ubottu/bot.py @@ -152,7 +152,10 @@ class Ubottu(Plugin): if "{moderators}" in value: moderators = await self.get_room_mods_and_admins(evt) if isinstance(moderators, list) and len(moderators) > 0: - value = value.replace("{moderators}", "https://matrix.to/#/" + "https://matrix.to/#/".join(moderators)) + m_str = '' + for m in moderators: + m_str = m_str + 'https://matrix.to/#/' + m + ' ' + value = value.replace("{moderators}", m_str) else: return False if to_user: