You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-12-01 09:58:03 +03:00
Use client.decryptEvent to avoid accessing js-sdk private members
This commit is contained in:
@@ -50,9 +50,8 @@ class FilePanel extends React.Component {
|
||||
if (room?.roomId !== this.props?.roomId) return;
|
||||
if (toStartOfTimeline || !data || !data.liveEvent || ev.isRedacted()) return;
|
||||
|
||||
if (ev.shouldAttemptDecryption()) {
|
||||
ev.attemptDecryption(room._client._crypto);
|
||||
}
|
||||
const client = MatrixClientPeg.get();
|
||||
client.decryptEvent(ev);
|
||||
|
||||
if (ev.isBeingDecrypted()) {
|
||||
this.decryptingEvents.add(ev.getId());
|
||||
|
||||
Reference in New Issue
Block a user