You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-10 09:22:25 +03:00
Improve comments and explainer for new decryption approach
This commit is contained in:
@@ -188,6 +188,7 @@ export default class EventIndex extends EventEmitter {
|
||||
}
|
||||
|
||||
if (ev.isBeingDecrypted()) {
|
||||
// XXX: Private member access
|
||||
await ev._decryptionPromise;
|
||||
}
|
||||
|
||||
@@ -523,6 +524,11 @@ export default class EventIndex extends EventEmitter {
|
||||
emit: false,
|
||||
});
|
||||
} else {
|
||||
// TODO the decryption promise is a private property, this
|
||||
// should either be made public or we should convert the
|
||||
// event that gets fired when decryption is done into a
|
||||
// promise using the once event emitter method:
|
||||
// https://nodejs.org/api/events.html#events_events_once_emitter_name
|
||||
return event._decryptionPromise;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user