Merge pull request #8759 from capilkey/2.2-join-fix
Only join a user if the connection is still active
This commit is contained in:
commit
5af41dabb4
@ -30,7 +30,7 @@ export default function handleValidateAuthToken({ body }, meetingId) {
|
||||
if (!User) return;
|
||||
|
||||
// Publish user join message
|
||||
if (valid && !waitForApproval) {
|
||||
if (valid && !waitForApproval && !!User.connectionId) {
|
||||
Logger.info('User=', User);
|
||||
userJoin(meetingId, userId, User.authToken);
|
||||
}
|
||||
|
@ -27,6 +27,13 @@ export default function userLeaving(meetingId, userId, connectionId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const modifier = {
|
||||
$set: {
|
||||
connectionId: false,
|
||||
},
|
||||
};
|
||||
Users.upsert(selector, modifier);
|
||||
|
||||
const payload = {
|
||||
userId,
|
||||
sessionId: meetingId,
|
||||
|
@ -45,7 +45,7 @@ export default function removeUser(meetingId, userId) {
|
||||
return Logger.error(`Removing user from collection: ${err}`);
|
||||
}
|
||||
|
||||
const sessionUserId = `${meetingId}-${userId}`;
|
||||
const sessionUserId = `${meetingId}--${userId}`;
|
||||
clearAllSessions(sessionUserId);
|
||||
|
||||
clearUserInfoForRequester(meetingId, userId);
|
||||
|
Loading…
Reference in New Issue
Block a user