mirror of
https://gitlab.com/ceda_ei/temac
synced 2025-10-19 17:40:04 +02:00
Fix python late binding behaviour.
This commit is contained in:
3
bot.py
3
bot.py
@@ -48,7 +48,8 @@ rooms = matrix_bot.get_rooms()
|
||||
|
||||
for chan_id, room_id in config.mappings:
|
||||
client.add_event_handler(
|
||||
lambda x: send_to_matrix(x, rooms[room_id], matrix_bot),
|
||||
lambda x, room_id=room_id: send_to_matrix(x, rooms[room_id],
|
||||
matrix_bot),
|
||||
events.NewMessage(chats=[chan_id])
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user