mirror of
https://github.com/thelounge/thelounge.git
synced 2026-03-14 14:35:50 +01:00
wip: unbork init progress
This commit is contained in:
parent
0067c30273
commit
f5c691f37b
7 changed files with 51 additions and 44 deletions
|
|
@ -34,7 +34,7 @@ class Msg {
|
|||
raw_modes!: any;
|
||||
when!: Date;
|
||||
whois!: any;
|
||||
users!: UserInMessage[] | string[];
|
||||
users!: string[];
|
||||
statusmsgGroup!: string;
|
||||
params!: string[];
|
||||
|
||||
|
|
|
|||
|
|
@ -840,7 +840,7 @@ function initializeClient(
|
|||
// socket.join is a promise depending on the adapter.
|
||||
void socket.join(client.id);
|
||||
|
||||
const sendInitEvent = (tokenToSend: string | null) => {
|
||||
const sendInitEvent = (tokenToSend?: string) => {
|
||||
socket.emit("init", {
|
||||
active: openChannel,
|
||||
networks: client.networks.map((network) =>
|
||||
|
|
@ -852,7 +852,7 @@ function initializeClient(
|
|||
};
|
||||
|
||||
if (Config.values.public) {
|
||||
sendInitEvent(null);
|
||||
sendInitEvent();
|
||||
} else if (!token) {
|
||||
client.generateToken((newToken) => {
|
||||
token = client.calculateTokenHash(newToken);
|
||||
|
|
@ -863,7 +863,7 @@ function initializeClient(
|
|||
});
|
||||
} else {
|
||||
client.updateSession(token, getClientIp(socket), socket.request);
|
||||
sendInitEvent(null);
|
||||
sendInitEvent();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue