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
Revert "Lazy loading: don't block on setting up room crypto"
This commit is contained in:
@@ -1085,16 +1085,15 @@ SyncApi.prototype._processSyncResponse = async function(
|
||||
|
||||
self._processEventsForNotifs(room, timelineEvents);
|
||||
|
||||
function processRoomEvent(e) {
|
||||
async function processRoomEvent(e) {
|
||||
client.emit("event", e);
|
||||
if (e.isState() && e.getType() == "m.room.encryption" && self.opts.crypto) {
|
||||
self.opts.crypto.onCryptoEvent(e);
|
||||
await self.opts.crypto.onCryptoEvent(e);
|
||||
}
|
||||
}
|
||||
|
||||
stateEvents.forEach(processRoomEvent);
|
||||
timelineEvents.forEach(processRoomEvent);
|
||||
|
||||
await Promise.mapSeries(stateEvents, processRoomEvent);
|
||||
await Promise.mapSeries(timelineEvents, processRoomEvent);
|
||||
ephemeralEvents.forEach(function(e) {
|
||||
client.emit("event", e);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user