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

fix review feedback

This commit is contained in:
Matthew Hodgson
2016-07-20 15:40:58 +01:00
parent c00a830cbb
commit 1412646a55
3 changed files with 12 additions and 10 deletions

View File

@@ -608,13 +608,13 @@ SyncApi.prototype._processSyncResponse = function(syncToken, data) {
// handle non-room account_data
if (data.account_data && utils.isArray(data.account_data.events)) {
client.store.storeAccountDataEvents(
data.account_data.events.map(client.getEventMapper()).map(
function(accountDataEvent) {
client.emit("accountData", accountDataEvent);
return accountDataEvent;
}
)
var events = data.account_data.events.map(client.getEventMapper());
client.store.storeAccountDataEvents(events);
events.forEach(
function(accountDataEvent) {
client.emit("accountData", accountDataEvent);
return accountDataEvent;
}
);
}