Remove user.leave()

This commit is contained in:
emad-salah 2021-11-04 13:32:40 +01:00
parent 53a8d44f69
commit 9e3b78546a

View file

@ -392,15 +392,11 @@ const authenticate = async (alias, pass, __user) => {
}
}
const logoff = () => {
user.leave()
}
const instantiateGun = () => {
const Config = require('../config')
if (user) {
user.leave()
}
// if (user) {
// user.leave()
// }
// @ts-ignore
user = null
if (gun) {
@ -523,7 +519,7 @@ const register = async (alias, pass) => {
module.exports = {
authenticate,
logoff,
instantiateGun,
isAuthenticated,
isAuthenticating,
isRegistering,