From 52957beb82085d1d090899cb29f5a1bd2c9f8ffe Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 23 Jun 2021 17:49:27 +0200 Subject: [PATCH] don't encrypt reactions --- src/matrix/room/sending/SendQueue.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/matrix/room/sending/SendQueue.js b/src/matrix/room/sending/SendQueue.js index 9d6af88e..90d6a988 100644 --- a/src/matrix/room/sending/SendQueue.js +++ b/src/matrix/room/sending/SendQueue.js @@ -19,7 +19,7 @@ import {ConnectionError} from "../../error.js"; import {PendingEvent, SendStatus} from "./PendingEvent.js"; import {makeTxnId, isTxnId} from "../../common.js"; import {REDACTION_TYPE} from "../common.js"; -import {getRelationFromContent} from "../timeline/relations.js"; +import {getRelationFromContent, REACTION_TYPE} from "../timeline/relations.js"; export class SendQueue { constructor({roomId, storage, hsApi, pendingEvents}) { @@ -296,7 +296,9 @@ export class SendQueue { // wouldn't be able to detect the remote echo already arrived and end up overwriting the new event const maxQueueIndex = Math.max(maxStorageQueueIndex, this._currentQueueIndex); const queueIndex = maxQueueIndex + 1; - const needsEncryption = eventType !== REDACTION_TYPE && !!this._roomEncryption; + const needsEncryption = eventType !== REDACTION_TYPE && + eventType !== REACTION_TYPE && + !!this._roomEncryption; pendingEvent = this._createPendingEvent({ roomId: this._roomId, queueIndex,