From 6cbdb5834160c8725b33c5a324df8f44e322aa26 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 7 Sep 2021 12:01:18 +0100 Subject: [PATCH] add comment --- src/components/views/messages/EncryptionEvent.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/views/messages/EncryptionEvent.tsx b/src/components/views/messages/EncryptionEvent.tsx index 88b96e0c5e..80b60f1fe7 100644 --- a/src/components/views/messages/EncryptionEvent.tsx +++ b/src/components/views/messages/EncryptionEvent.tsx @@ -35,6 +35,7 @@ const EncryptionEvent = forwardRef<HTMLDivElement, IProps>(({ mxEvent }, ref) => const roomId = mxEvent.getRoomId(); const isRoomEncrypted = MatrixClientPeg.get().isRoomEncrypted(roomId); + // if no change happened then skip rendering this, a shallow check is enough as events are parsed JSON if (!objectHasDiff(mxEvent.getPrevContent(), mxEvent.getContent())) return null; // nop if (mxEvent.getContent().algorithm === ALGORITHM && isRoomEncrypted) {