Decrypt all events before use
This commit is contained in:
parent
2c5b386af9
commit
bf290a5cd7
10 changed files with 44 additions and 34 deletions
|
|
@ -757,7 +757,17 @@ export default {
|
|||
let lastDisplayedEvent = undefined;
|
||||
events = events.flatMap((e) => {
|
||||
let result = [];
|
||||
e.component = this.componentForEvent(e, false);
|
||||
if (e.isEncrypted()) {
|
||||
if (e.getClearContent()) {
|
||||
e.component = this.componentForEvent(e, false);
|
||||
} else {
|
||||
this.$matrix.matrixClient.decryptEventIfNeeded(e).then(() => {
|
||||
e.component = this.componentForEvent(e, false);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
e.component = this.componentForEvent(e, false);
|
||||
}
|
||||
if (e.getId() == this.readMarker && showReadMarker) {
|
||||
const readMarkerEvent = ROOM_READ_MARKER_EVENT_PLACEHOLDER;
|
||||
readMarkerEvent["component"] = this.componentForEvent(readMarkerEvent, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue