From 1c03eabadb308e27ad6b17d6dbf872700aec80d0 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 3 Jul 2015 16:46:30 +0100 Subject: [PATCH] Not all events have a sender --- src/controllers/organisms/Notifier.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/organisms/Notifier.js b/src/controllers/organisms/Notifier.js index 9c16d7eaa9..63e937780d 100644 --- a/src/controllers/organisms/Notifier.js +++ b/src/controllers/organisms/Notifier.js @@ -32,7 +32,7 @@ module.exports = { onRoomTimeline: function(ev, room, toStartOfTimeline) { if (toStartOfTimeline) return; - if (ev.sender.userId == MatrixClientPeg.get().credentials.userId) return; + if (ev.sender && ev.sender.userId == MatrixClientPeg.get().credentials.userId) return; var enabled = global.localStorage.getItem('notifications_enabled'); if (enabled === 'false') return;