增加群组创建、邀请与成员权限管理

This commit is contained in:
xhgit committed 2026-11-14 08:20:47 +08:00
1 parent b1f55df263
commit 99a741e6da
13 files changed
+620 -5

No files matched your search

+2 -1
View File
@@ -17,6 +17,7 @@ import (
"xhchat/server/internal/contacts"
"xhchat/server/internal/database"
"xhchat/server/internal/delivery"
"xhchat/server/internal/groups"
"xhchat/server/internal/httpapi"
"github.com/jackc/pgx/v5/pgxpool"
@@ -85,7 +86,7 @@ func run() error {
}
}()
server := &http.Server{
Addr: cfg.Addr, Handler: httpapi.New(accounts, contacts.New(db), envelopes, cache, cfg.Origins, ready),
Addr: cfg.Addr, Handler: httpapi.New(accounts, contacts.New(db), envelopes, groups.New(db), cache, cfg.Origins, ready),
ReadHeaderTimeout: 5 * time.Second, ReadTimeout: 10 * time.Second,
WriteTimeout: 15 * time.Second, IdleTimeout: 60 * time.Second, MaxHeaderBytes: 16 << 10,
BaseContext: func(net.Listener) context.Context { return ctx },