mirror of
https://github.com/EchoSixHIYA/WebSpeak-client-for-TeamSpeak.git
synced 2026-12-03 12:02:50 +08:00
feat: add private expiring workspace invites and restore KAAK home
This commit is contained in:
1 parent
33ba062686
commit
72d7e6e013
39 files changed
+512
-53
No files matched your search
+7
-1
@@ -109,7 +109,13 @@ async function runRelayMode(): Promise<void> {
|
||||
import("./server/voice-gateway.js"),
|
||||
]);
|
||||
const logger = createLogger(LOG_DIR);
|
||||
const [{ WebSpeakDatabase }, { loadOrCreateMasterSecret }, { WorkspaceInvites }] = await Promise.all([
|
||||
import("./persistence/database.js"), import("./security/master-secret.js"), import("./server/workspace-invites.js"),
|
||||
]);
|
||||
const inviteDatabase = new WebSpeakDatabase(path.join(DATA_DIR, "webspeak.db"));
|
||||
const workspaceInvites = new WorkspaceInvites(inviteDatabase, loadOrCreateMasterSecret(path.join(DATA_DIR, "master.key")));
|
||||
const voiceGateway = createVoiceGatewayServer({
|
||||
workspaceInvites,
|
||||
host: voiceHost,
|
||||
port: voicePort,
|
||||
sharedToken: token,
|
||||
@@ -144,7 +150,7 @@ async function runRelayMode(): Promise<void> {
|
||||
if (stopping) return;
|
||||
stopping = true;
|
||||
relay.close();
|
||||
void voiceGateway.stop().finally(() => process.exit(0));
|
||||
void voiceGateway.stop().finally(() => { inviteDatabase.close(); process.exit(0); });
|
||||
};
|
||||
process.once("SIGINT", shutdown);
|
||||
process.once("SIGTERM", shutdown);
|
||||
|
||||
Reference in new issue
Block a user