From: Italo Rossi Date: Fri, 13 Jan 2017 19:13:14 +0000 (-0300) Subject: FS-9947 [verto_communicator] Do not try to parse empty chat messages X-Git-Tag: v1.8.0~913 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec83cb77f8d0c72ac9be2fe0f361a2a785903914;p=thirdparty%2Ffreeswitch.git FS-9947 [verto_communicator] Do not try to parse empty chat messages --- diff --git a/html5/verto/verto_communicator/src/vertoService/services/vertoService.js b/html5/verto/verto_communicator/src/vertoService/services/vertoService.js index 91ad8a5d87..1994a85196 100644 --- a/html5/verto/verto_communicator/src/vertoService/services/vertoService.js +++ b/html5/verto/verto_communicator/src/vertoService/services/vertoService.js @@ -617,6 +617,10 @@ vertoService.service('verto', ['$rootScope', '$cookieStore', '$location', 'stora case $.verto.enum.message.info: var body = params.body; var from = params.from_msg_name || params.from; + if (!body) { + console.log('Received an empty body: ', params); + return; + } $rootScope.$emit('chat.newMessage', { from: from, body: body