|
|
@ -64,6 +64,9 @@ class Callbacks(object): |
|
|
|
room.display_name, room.user_name(event.sender), event.body |
|
|
|
) |
|
|
|
) |
|
|
|
os.makedirs("./chatlogs", exist_ok=True) |
|
|
|
with open("chatlogs/" + self.bot.name + "_" + room.display_name + ".txt", "a") as f: |
|
|
|
f.write("{}: {}\n".format(room.user_name(event.sender), event.body)) |
|
|
|
await self.client.room_read_markers(room.room_id, event_id, event_id) |
|
|
|
# Ignore messages from ourselves |
|
|
|
if is_own_message: |
|
|
|