mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Chat user select fix
This commit is contained in:
@@ -59,14 +59,16 @@ function setup(data: SubmoduleData): void {
|
||||
// -----------------------------------------------------------------
|
||||
|
||||
socket.join(userid.toString())
|
||||
let currUser = dbtools.Select(msgDB, 'users', {
|
||||
let currUser: any = dbtools.Select(msgDB, 'users', {
|
||||
id: userid,
|
||||
})[0]
|
||||
if (!currUser) {
|
||||
})
|
||||
if (!currUser || currUser.length === 0) {
|
||||
currUser = {
|
||||
id: userid,
|
||||
}
|
||||
dbtools.Insert(msgDB, 'users', currUser)
|
||||
} else {
|
||||
currUser = currUser[0]
|
||||
}
|
||||
|
||||
const groups = dbtools
|
||||
|
Reference in New Issue
Block a user