feat: add account automation and isolated chat
- add account-level auto rating and daily polish tasks\n- add cached historical chat, media, emoji, and per-account realtime sync\n- add SQLite, MySQL, and PostgreSQL migrations and regression coverage\n- align account, sidebar, and chat interfaces with the new workflows
This commit is contained in:
1 parent
d7abbfb2b6
commit
67d7214930
59 files changed
+5202
-211
No files matched your search
@@ -21,6 +21,7 @@ import (
|
||||
"xianyu-go/internal/account"
|
||||
"xianyu-go/internal/auth"
|
||||
"xianyu-go/internal/automation"
|
||||
"xianyu-go/internal/chat"
|
||||
"xianyu-go/internal/db"
|
||||
"xianyu-go/internal/notify"
|
||||
"xianyu-go/internal/webui"
|
||||
@@ -60,6 +61,7 @@ type Server struct {
|
||||
Manager *account.Manager
|
||||
automation *automation.Center
|
||||
notifier *notify.Notifier
|
||||
chat *chat.Service
|
||||
MTop mtop.Client
|
||||
CookieRenew xrenew.Service
|
||||
QRLogin qrLoginService
|
||||
@@ -85,6 +87,9 @@ type Server struct {
|
||||
loginLimiter *loginFailureLimiter
|
||||
}
|
||||
|
||||
// SetChatService installs the shared chat persistence and live event hub.
|
||||
func (s *Server) SetChatService(service *chat.Service) { s.chat = service }
|
||||
|
||||
// New 构造。autoCenter/notifier 由调用方完成创建后注入(创建顺序:
|
||||
// adapter → manager → automation → notifier → server)。
|
||||
func New(store *db.Store, manager *account.Manager, secure bool, webDir, addr string, logger *slog.Logger, autoCenter *automation.Center, notifier *notify.Notifier) *Server {
|
||||
@@ -151,6 +156,9 @@ func (s *Server) Router() http.Handler {
|
||||
|
||||
// 账号 cookie
|
||||
s.mountCookies(r)
|
||||
s.mountAccountTasks(r)
|
||||
// 在线聊天(历史 REST + 应用层 WebSocket)
|
||||
s.mountChat(r)
|
||||
// 扫码登录
|
||||
s.mountQRLoginReal(r)
|
||||
// 密码登录
|
||||
|
||||
Reference in new issue
Block a user