fix bug bug

master
histausse 3 years ago
parent 154f2fe435
commit 2e7f25995a
Signed by: histausse
GPG Key ID: 67486F107F62E9E9

@ -22,7 +22,6 @@ async def __pong(
""" """
If the bot is pinged, send "Pong" If the bot is pinged, send "Pong"
""" """
print("pong")
if (client.user_name + ':') in message.body: if (client.user_name + ':') in message.body:
await client.send_message(room.room_id, "Pong") await client.send_message(room.room_id, "Pong")
@ -43,12 +42,14 @@ async def run(
""" """
Format and send the message Format and send the message
""" """
print("foward")
if (client.user_name + ':') in message.body: if (client.user_name + ':') in message.body:
return return
message = f"{ message.sender_key }: { message.body }" message = f"{ message.sender }: { message.body }"
for to_room in config.rooms: for to_room in config.rooms:
await client.send_message(to_room, message) to_room = await client.resolve_room(to_room)
if to_room.id != from_room.room_id:
await client.send_message(to_room.id, message)
bot = await Client( bot = await Client(
config.username, config.username,

Loading…
Cancel
Save