diff --git a/internal/config/config.go b/internal/config/config.go index 193007f..00c898b 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -41,11 +41,14 @@ type Config struct { LiveKitAPIKey string LiveKitAPISecret string LiveKitURL string - Version string - Commit string - BuildDate string - ShutdownTTL time.Duration - Maintenance time.Duration + // LiveKitTokenTTL — время жизни токена доступа к комнате (AGENT.md 7.14: + // по умолчанию 10 минут, клиент переиздаёт токен до истечения). + LiveKitTokenTTL time.Duration + Version string + Commit string + BuildDate string + ShutdownTTL time.Duration + Maintenance time.Duration } func Load() (Config, error) { diff --git a/internal/server/server.go b/internal/server/server.go index 25dc997..f13519f 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -96,7 +96,7 @@ func New(cfg config.Config, db *database.DB, logger *slog.Logger, deps Deps) *Se slowmode: map[string]time.Time{}, presence: map[uint64]time.Time{}, webhookSeen: map[string]time.Time{}, - voice: voice.NewIssuer(cfg.LiveKitAPIKey, cfg.LiveKitAPISecret, time.Hour), + voice: voice.NewIssuer(cfg.LiveKitAPIKey, cfg.LiveKitAPISecret, cfg.LiveKitTokenTTL), } switch { case deps.Permissions != nil: