fix {moderators} replacement in fact
This commit is contained in:
parent
8d39085faf
commit
715dedb4f7
1 changed files with 4 additions and 1 deletions
|
@ -152,7 +152,10 @@ class Ubottu(Plugin):
|
||||||
if "{moderators}" in value:
|
if "{moderators}" in value:
|
||||||
moderators = await self.get_room_mods_and_admins(evt)
|
moderators = await self.get_room_mods_and_admins(evt)
|
||||||
if isinstance(moderators, list) and len(moderators) > 0:
|
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:
|
else:
|
||||||
return False
|
return False
|
||||||
if to_user:
|
if to_user:
|
||||||
|
|
Loading…
Reference in a new issue