From 2f4b3b37613d67891adc684bbd777019064297eb Mon Sep 17 00:00:00 2001 From: Connor Turland Date: Wed, 17 Feb 2016 13:49:48 +1300 Subject: [PATCH] call was ending in wrong situation --- app/assets/javascripts/src/Metamaps.js.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/src/Metamaps.js.erb b/app/assets/javascripts/src/Metamaps.js.erb index 832aeeb9..14c4e28b 100644 --- a/app/assets/javascripts/src/Metamaps.js.erb +++ b/app/assets/javascripts/src/Metamaps.js.erb @@ -2155,7 +2155,8 @@ Metamaps.Realtime = { mapper.inConversation = false; self.room.chat.mapperLeftCall(id); - if (self.countOthersInConversation() < 2) { + if ((self.inConversation && self.countOthersInConversation() === 0) || + (!self.inConversation && self.countOthersInConversation() === 1)) { self.callEnded(); } }