From 83634bf93040918e1605891fd3e268ea7a74bc26 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 20 Jan 2016 15:56:11 +0000 Subject: [PATCH] Update for new unread count format --- src/components/structures/MatrixChat.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 97a699292d..975ea37aab 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -641,8 +641,8 @@ module.exports = React.createClass({ for (var i = 0; i < rooms.length; ++i) { if (rooms[i].hasMembershipState(MatrixClientPeg.get().credentials.userId, 'invite')) { ++notifCount; - } else if (rooms[i].unread_notification_count) { - notifCount += rooms[i].unread_notification_count; + } else if (rooms[i].unread_notifications && rooms[i].unread_notifications['notification_count']) { + notifCount += rooms[i].unread_notifications['notification_count']; } } this.favicon.badge(notifCount);