improve isDialInUser function - use same var

This commit is contained in:
Anton Georgiev 2018-03-07 11:42:13 -05:00
parent 89b7da5be2
commit 9d7d8edbe0

View File

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