You've already forked matrix-js-sdk
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:
14
lib/sync.js
14
lib/sync.js
@@ -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;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user