fix(e2ee): self-react after decryption promise

This commit is contained in:
vulet 2021-04-25 16:04:01 +08:00
parent 39a88b2722
commit a371b7c501

View file

@ -18,6 +18,7 @@ matrixClient.on('RoomMember.membership', (event, member) => {
});
matrixClient.on('event', async (event) => {
if (event.isEncrypted()) await event._decryptionPromise;
if (event.getSender() === matrixClient.credentials.userId) return matrix.utils.selfReact(event);
if (!event.getContent()['m.relates_to']) return;
if (event.event.unsigned.age > 10000) return;