From 093f139d344c94d8706c82b6076daea4f84b687e Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 5 Jul 2019 10:26:47 +0100 Subject: [PATCH] Fix exception whilst syncing event.getPushRules() may return null (for better or worse...). Use client.getPushRulesForEvent which will calculate them if they haven't already been calculated. Fixes https://github.com/vector-im/riot-web/issues/10269 --- src/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.js b/src/client.js index 87db5c20a..ecfa98b7d 100644 --- a/src/client.js +++ b/src/client.js @@ -310,7 +310,7 @@ function MatrixClient(opts) { break; } - highlightCount += event.getPushActions().tweaks.highlight ? 1 : 0; + highlightCount += this.getPushActionsForEvent(event).tweaks.highlight ? 1 : 0; } // Note: we don't need to handle 'total' notifications because the counts