fix(e2ee): self-react after decryption promise
This commit is contained in:
parent
39a88b2722
commit
a371b7c501
1 changed files with 1 additions and 0 deletions
1
main.js
1
main.js
|
@ -18,6 +18,7 @@ matrixClient.on('RoomMember.membership', (event, member) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
matrixClient.on('event', async (event) => {
|
matrixClient.on('event', async (event) => {
|
||||||
|
if (event.isEncrypted()) await event._decryptionPromise;
|
||||||
if (event.getSender() === matrixClient.credentials.userId) return matrix.utils.selfReact(event);
|
if (event.getSender() === matrixClient.credentials.userId) return matrix.utils.selfReact(event);
|
||||||
if (!event.getContent()['m.relates_to']) return;
|
if (!event.getContent()['m.relates_to']) return;
|
||||||
if (event.event.unsigned.age > 10000) return;
|
if (event.event.unsigned.age > 10000) return;
|
||||||
|
|
Loading…
Reference in a new issue