Skip to content
Snippets Groups Projects
Commit 249e7966 authored by Maxim Khlobystov's avatar Maxim Khlobystov
Browse files

Prevented the client logging error when Auth.fullInfo is not provided.

parent 2ed8f083
No related branches found
No related tags found
No related merge requests found
......@@ -5,15 +5,19 @@ const logClient = function (type, log, ...args) {
const SERVER_CONN_ID = this.connection.id;
const User = Users.findOne({ connectionId: SERVER_CONN_ID });
const logContents = { ...args };
let validUser; // local variable that stores the future validUser value
if (User) {
if (User.meetingId === args[0].meetingId) {
args[0].validUser = 'vaild';
validUser = 'valid';
} else {
args[0].validUser = 'invaild';
validUser = 'invalid';
}
} else {
args[0].validUser = 'notFound';
validUser = 'notFound';
}
if (args && args[0]) {
args[0].validUser = validUser;
}
if (typeof log === 'string' || log instanceof String) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment