From a24a9d35c458b7c1f65f965c9f77250207ee2e0c Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 20 Jan 2016 18:52:32 +0000 Subject: [PATCH] Fix PR comments: typos and redundant line --- lib/models/room.js | 4 ++-- lib/sync.js | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/models/room.js b/lib/models/room.js index 9ece7cae1..f0d9baeb0 100644 --- a/lib/models/room.js +++ b/lib/models/room.js @@ -124,7 +124,7 @@ function Room(roomId, opts) { utils.inherits(Room, EventEmitter); /** - * Get one of the notification counst for this room + * Get one of the notification counts for this room * @param {String} type The type of notification count to get. default: 'total' * @return {Number} The notification count, or undefined if there is no count * for this type. @@ -135,7 +135,7 @@ Room.prototype.getUnreadNotificationCount = function(type) { }; /** - * Set one of the notification counst for this room + * Set one of the notification counts for this room * @param {String} type The type of notification count to set. * @param {Number} type The new count */ diff --git a/lib/sync.js b/lib/sync.js index 0aa842f94..4816a03d3 100644 --- a/lib/sync.js +++ b/lib/sync.js @@ -469,7 +469,6 @@ SyncApi.prototype._sync = function(syncOptions, attempt) { var accountDataEvents = self._mapSyncEventsFormat(joinObj.account_data); // we do this first so it's correct when any of the events fire - room.unread_notifications = joinObj.unread_notifications || {}; if (joinObj.unread_notifications) { room.setUnreadNotificationCount( 'total', joinObj.unread_notifications.notification_count