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.
This commit is contained in:
parent
141e89ab11
commit
27df072c0d
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
}, "")
|
||||
|
||||
|
|
Loading…
Reference in a new issue