FS-9947 [verto_communicator] Do not try to parse empty chat messages

This commit is contained in:
Italo Rossi 2017-01-13 16:13:14 -03:00
parent a46a67e12a
commit ec83cb77f8
1 changed files with 4 additions and 0 deletions

View File

@ -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