add comment

This commit is contained in:
Michael Telatynski 2021-09-07 12:01:18 +01:00
parent 68836b9c68
commit 6cbdb58341

View file

@ -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) {