Merge remote-tracking branch 'jfsiebel/send-user-logged-out-info' into user-logged-out
This commit is contained in:
commit
85f4b13275
@ -18,9 +18,9 @@ export default function userLeaving(meetingId, userId, connectionId) {
|
||||
userId,
|
||||
};
|
||||
|
||||
const User = Users.findOne(selector);
|
||||
const user = Users.findOne(selector);
|
||||
|
||||
if (!User) {
|
||||
if (!user) {
|
||||
Logger.info(`Skipping userLeaving. Could not find ${userId} in ${meetingId}`);
|
||||
return;
|
||||
}
|
||||
@ -32,13 +32,14 @@ export default function userLeaving(meetingId, userId, connectionId) {
|
||||
|
||||
// If the current user connection is not the same that triggered the leave we skip
|
||||
if (auth?.connectionId !== connectionId) {
|
||||
Logger.info(`Skipping userLeaving. User connectionId=${User.connectionId} is different from requester connectionId=${connectionId}`);
|
||||
Logger.info(`Skipping userLeaving. User connectionId=${user.connectionId} is different from requester connectionId=${connectionId}`);
|
||||
return false;
|
||||
}
|
||||
|
||||
const payload = {
|
||||
userId,
|
||||
sessionId: meetingId,
|
||||
loggedOut: user.loggedOut,
|
||||
};
|
||||
|
||||
ClientConnections.removeClientConnection(`${meetingId}--${userId}`, connectionId);
|
||||
|
@ -20,6 +20,6 @@ export default function userLeftMeeting() { // TODO-- spread the code to method/
|
||||
ClientConnections.removeClientConnection(this.userId, this.connection.id);
|
||||
}
|
||||
} catch (err) {
|
||||
Logger.error(`leaving dummy user to collection: ${err}`);
|
||||
Logger.error(`Error on user left: ${err}`);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user