From a35071bd64902106b9e68f8e2a0f3ff2b4d1ce82 Mon Sep 17 00:00:00 2001 From: Ceda EI Date: Thu, 16 May 2019 18:53:36 +0530 Subject: [PATCH] Fix python late binding behaviour. --- bot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bot.py b/bot.py index b2e14a8..d1e0364 100644 --- a/bot.py +++ b/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]) )