Skip to content

Commit

Permalink
Fix exception whilst syncing
Browse files Browse the repository at this point in the history
event.getPushRules() may return null (for better or worse...).
Use client.getPushRulesForEvent which will calculate them if they
haven't already been calculated.

Fixes element-hq/element-web#10269
  • Loading branch information
dbkr committed Jul 5, 2019
1 parent 1083efc commit 093f139
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 093f139

Please sign in to comment.