mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-03 01:42:50 +08:00
Persist client identity across sessions
Previously every connect generated a fresh tsclientlib identity, so the server saw a new client UID each session. The connector now accepts a saved identity via --identity and always reports the one actually used (freshly generated or reused) back in the "connected" event; the frontend round-trips it through localStorage so reconnecting keeps the same UID. Verified end-to-end against the real test server: two separate connects with the identity carried over produced byte-identical identity blobs.
This commit is contained in:
1 parent
249687d98a
commit
7217bc146a
4 files changed
+31
-2
No files matched your search
@@ -71,6 +71,7 @@ wss.on("connection", (socket: WebSocket) => {
|
||||
serverPassword: msg.serverPassword,
|
||||
channelPassword: msg.channelPassword,
|
||||
defaultChannel: msg.defaultChannel,
|
||||
identity: msg.identity,
|
||||
};
|
||||
connection = new Ts3Connection(options);
|
||||
connection.onEvent((event) => socket.send(JSON.stringify(event)));
|
||||
|
||||
Reference in new issue
Block a user