diff --git a/src/components/views/messages/EncryptionEvent.js b/src/components/views/messages/EncryptionEvent.js new file mode 100644 index 0000000000..b7c13c0a05 --- /dev/null +++ b/src/components/views/messages/EncryptionEvent.js @@ -0,0 +1,61 @@ +/* +Copyright 2020 The Matrix.org Foundation C.I.C. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +import React from 'react'; +import PropTypes from 'prop-types'; +import {MatrixClientPeg} from '../../../MatrixClientPeg'; +import * as sdk from '../../../index'; +import { _t } from '../../../languageHandler'; +import {getNameForEventRoom, userLabelForEventRoom} + from '../../../utils/KeyVerificationStateObserver'; +import dis from "../../../dispatcher"; +import {RIGHT_PANEL_PHASES} from "../../../stores/RightPanelStorePhases"; + +export default class EncryptionEvent extends React.Component { + render() { + const {mxEvent} = this.props; + + let body; + let classes = "mx_EventTile_bubble mx_cryptoEvent mx_cryptoEvent_icon"; + if (mxEvent.getContent().algorithm === 'm.megolm.v1.aes-sha2') { + body =