even more fixes

This commit is contained in:
zefie
2022-02-10 01:20:58 -05:00
parent 4d8bc314b4
commit 955f21039c
2 changed files with 7 additions and 2 deletions

View File

@@ -86,7 +86,7 @@ wtv-ssl-timeout: 240
wtv-login-timeout: 7200 wtv-login-timeout: 7200
`; `;
if (!limitedLogin) { if (!limitedLogin) {
ssid_sessions[socket.ssid].assignMailstore(); ssid_sessions[socket.ssid].assignMailStore();
headers += getServiceString('all', { "exceptions": ["wtv-register"] }); headers += getServiceString('all', { "exceptions": ["wtv-register"] });
if (offline_user_list) headers += "wtv-offline-user-list: " + offline_user_list + "\n"; if (offline_user_list) headers += "wtv-offline-user-list: " + offline_user_list + "\n";
headers += `wtv-messenger-authorized: ${messenger_authorized} headers += `wtv-messenger-authorized: ${messenger_authorized}

View File

@@ -53,10 +53,15 @@ class WTVClientSessionData {
this.loginWhitelist.push("wtv-head-waiter:/password"); this.loginWhitelist.push("wtv-head-waiter:/password");
} }
assignMailStore() {
this.mailstore = new WTVMail(this.minisrv_config, this)
}
switchUserID(user_id, update_mail = true, update_ticket = true) { switchUserID(user_id, update_mail = true, update_ticket = true) {
this.user_id = user_id; this.user_id = user_id;
this.loadSessionData(); this.loadSessionData();
this.mailstore = new WTVMail(this.minisrv_config, this) if (this.isRegistered()) this.assignMailStore();
if (this.data_store.wtvsec_login && update_ticket) this.setTicketData('user_id', user_id); if (this.data_store.wtvsec_login && update_ticket) this.setTicketData('user_id', user_id);
} }