mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-04-24 18:52:07 +08:00
feat: add session management to MessageChain
- Implemented session ID creation and reuse based on user activity, with a timeout of 15 minutes. - Added remote command to clear user sessions, enhancing user session management capabilities. - Updated Command class to include a new command for clearing sessions.
This commit is contained in:
@@ -5,6 +5,7 @@ from typing import Any, Union, Dict, Optional
|
||||
|
||||
from app.chain import ChainBase
|
||||
from app.chain.download import DownloadChain
|
||||
from app.chain.message import MessageChain
|
||||
from app.chain.site import SiteChain
|
||||
from app.chain.subscribe import SubscribeChain
|
||||
from app.chain.system import SystemChain
|
||||
@@ -140,6 +141,12 @@ class Command(metaclass=Singleton):
|
||||
"description": "当前版本",
|
||||
"category": "管理",
|
||||
"data": {}
|
||||
},
|
||||
"/clear_session": {
|
||||
"func": MessageChain().remote_clear_session,
|
||||
"description": "清除会话",
|
||||
"category": "管理",
|
||||
"data": {}
|
||||
}
|
||||
}
|
||||
# 插件命令集合
|
||||
|
||||
Reference in New Issue
Block a user