Support decryption on entries fetched from hs

This commit is contained in:
RMidhunSuresh 2021-12-07 23:07:10 +05:30
parent 7cc3d4b91a
commit c690de9f7b

View file

@ -571,7 +571,12 @@ export class BaseRoom extends EventEmitter {
displayName: member.content.displayname,
avatarUrl: member.content.avatar_url
};
return new NonPersistedEventEntry(entry, this._fragmentIdComparer);
const eventEntry = new NonPersistedEventEntry(entry, this._fragmentIdComparer);
if (eventEntry.eventType === EVENT_ENCRYPTED_TYPE) {
const request = this._decryptEntries(DecryptionSource.Timeline, [eventEntry]);
await request.complete();
}
return eventEntry;
}