fix {moderators} replacement in fact

This commit is contained in:
Nils Büchner 2024-04-13 07:43:43 +02:00
parent 8d39085faf
commit 715dedb4f7

View file

@ -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: