fix: 修复语法错误和导入问题

This commit is contained in:
2026-04-11 12:32:23 +08:00
parent b228283133
commit d3236413f3
5 changed files with 5 additions and 6 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -466,11 +466,6 @@ async def handle_matrix_message(action: str, conversation_id: str = None, user_m
await matrix_bot.send_message(room_id, f"处理消息时出错: {str(e)}")
finally:
db.close()
except Exception as e:
logger.error(f"处理Matrix消息失败: {e}")
finally:
db.close()
# ==================== 启动和关闭 ====================

View File

@@ -201,4 +201,8 @@ class MatrixBot:
await self.client.close()
except:
pass
self.is_running = False
self.is_running = False
# 全局实例
matrix_bot = MatrixBot()