From 64727cb60e3c2c185a8e2cad36aa08519bd40ba9 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 7 Aug 2015 14:48:50 +0100 Subject: [PATCH] Don't die on malformed VoIP offers --- skins/base/views/molecules/voip/MCallInviteTile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skins/base/views/molecules/voip/MCallInviteTile.js b/skins/base/views/molecules/voip/MCallInviteTile.js index 4e8f6baf..ed73553b 100644 --- a/skins/base/views/molecules/voip/MCallInviteTile.js +++ b/skins/base/views/molecules/voip/MCallInviteTile.js @@ -30,7 +30,7 @@ module.exports = React.createClass({ var senderName = event.sender ? event.sender.name : "Someone"; // FIXME: Find a better way to determine this from the event? var type = "voice"; - if (event.getContent().offer && + if (event.getContent().offer && event.getContent().offer.sdp && event.getContent().offer.sdp.indexOf('m=video') !== -1) { type = "video"; }