1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-11-28 05:03:59 +03:00

Update our push rules when they come down stream

Also expose a useful function from pushprocessor.

Fixes https://github.com/vector-im/vector-web/issues/1495
This commit is contained in:
David Baker
2016-08-15 18:40:12 +01:00
parent 6739da5acb
commit 0ba1a1dabc
2 changed files with 18 additions and 14 deletions

View File

@@ -613,6 +613,9 @@ SyncApi.prototype._processSyncResponse = function(syncToken, data) {
client.store.storeAccountDataEvents(events);
events.forEach(
function(accountDataEvent) {
if (accountDataEvent.getType() == 'm.push_rules') {
client.pushRules = accountDataEvent.getContent();
}
client.emit("accountData", accountDataEvent);
return accountDataEvent;
}