From 27df072c0de36859b16553af2ba4addb3626856f Mon Sep 17 00:00:00 2001 From: Kumi Date: Sat, 18 May 2024 21:30:48 +0200 Subject: [PATCH] fix: correct target room for avatar setup Fixed an issue where the bot attempted to set the avatar for the wrong room when creating a new room. The avatar is now correctly assigned to the newly created room instead of the incorrectly referenced room variable. This ensures that newly created rooms properly display the intended logo from the start, improving the user experience by maintaining consistent branding across rooms. --- src/gptbot/tools/newroom.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gptbot/tools/newroom.py b/src/gptbot/tools/newroom.py index ed61d3f..68b8463 100644 --- a/src/gptbot/tools/newroom.py +++ b/src/gptbot/tools/newroom.py @@ -47,7 +47,7 @@ class Newroom(BaseTool): await self.bot.add_rooms_to_space(space[0], [new_room.room_id]) if self.bot.logo_uri: - await self.bot.matrix_client.room_put_state(room, "m.room.avatar", { + await self.bot.matrix_client.room_put_state(new_room, "m.room.avatar", { "url": self.bot.logo_uri }, "")