fix: correct user variable in invite error log
Updated the logger to use `event.sender` instead of an undefined `user` variable when logging a failed space invitation, ensuring the correct information is logged. This change addresses a bug where the wrong variable was referenced, potentially causing confusion when diagnosing issues with space invites.
This commit is contained in:
parent
2c04d8bf9c
commit
75d00ea50e
1 changed files with 1 additions and 1 deletions
|
@ -120,7 +120,7 @@ async def command_space(room: MatrixRoom, event: RoomMessageText, bot):
|
|||
|
||||
if isinstance(response, RoomInviteError):
|
||||
bot.logger.log(
|
||||
f"Failed to invite user {user} to space {space}", "error")
|
||||
f"Failed to invite user {event.sender} to space {space}", "error")
|
||||
await bot.send_message(
|
||||
room, "Sorry, I couldn't invite you to the space. Please try again later.", True)
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue