use nicer usernames

This commit is contained in:
histausse 2021-10-13 23:33:55 +02:00
parent 2e7f25995a
commit bb9c8615ee
Signed by: histausse
GPG key ID: 67486F107F62E9E9

View file

@ -44,7 +44,10 @@ async def run(
"""
if (client.user_name + ':') in message.body:
return
message = f"{ message.sender }: { message.body }"
sender = from_room.user_name(message.sender) # Don't look to work
if sender is None:
sender = ':'.join(message.sender.split(':')[:-1])[1:]
message = f"{ sender }: { message.body }"
for to_room in config.rooms:
to_room = await client.resolve_room(to_room)