Made sure user is removed from userlist only in case of dial-in (not web) users.

This commit is contained in:
Maxim Khlobystov 2018-01-15 11:47:19 -05:00
parent 9ff881f138
commit 71c2d16918

View File

@ -13,8 +13,14 @@ export default function handleVoiceUpdate({ body }, meetingId) {
voiceUserId: String,
});
const { intId } = voiceUser;
const { intId, voiceUserId } = voiceUser;
const isDialInUser = (voiceUserId) => {
return voiceUserId && (voiceUserId[0] == 'v');
}
// if the user is dial-in, leaving voice also means leaving userlist
if(isDialInUser(voiceUserId)) removeUser(meetingId, intId);
removeUser(meetingId, intId);
return removeVoiceUser(meetingId, voiceUser);
}