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
generic account data support
This commit is contained in:
14
lib/sync.js
14
lib/sync.js
@@ -605,7 +605,19 @@ SyncApi.prototype._processSyncResponse = function(syncToken, data) {
|
||||
});
|
||||
}
|
||||
|
||||
// the returned json structure is abit crap, so make it into a
|
||||
// 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;
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// the returned json structure is a bit crap, so make it into a
|
||||
// nicer form (array) after applying sanity to make sure we don't fail
|
||||
// on missing keys (on the off chance)
|
||||
var inviteRooms = [];
|
||||
|
||||
Reference in New Issue
Block a user