2017-12-10 15:50:41 +03:00
|
|
|
/*
|
|
|
|
Copyright 2017 New Vector Ltd
|
2019-08-13 20:17:42 +03:00
|
|
|
Copyright 2019 Michael Telatynski <7t3chguy@gmail.com>
|
2019-11-09 02:07:11 +03:00
|
|
|
Copyright 2019 The Matrix.org Foundation C.I.C.
|
2017-12-10 15:50:41 +03:00
|
|
|
|
|
|
|
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';
|
2019-12-20 04:19:56 +03:00
|
|
|
import * as sdk from '../../../index';
|
2017-12-15 21:39:01 +03:00
|
|
|
import {_t} from '../../../languageHandler';
|
2017-12-10 15:50:41 +03:00
|
|
|
import PropTypes from 'prop-types';
|
2020-05-14 05:41:41 +03:00
|
|
|
import dis from '../../../dispatcher/dispatcher';
|
2018-01-10 15:06:24 +03:00
|
|
|
import {wantsDateSeparator} from '../../../DateUtils';
|
2019-12-17 20:26:12 +03:00
|
|
|
import {MatrixEvent} from 'matrix-js-sdk';
|
2019-10-01 05:39:58 +03:00
|
|
|
import {makeUserPermalink, RoomPermalinkCreator} from "../../../utils/permalinks/Permalinks";
|
2018-02-10 14:19:43 +03:00
|
|
|
import SettingsStore from "../../../settings/SettingsStore";
|
2019-11-09 02:07:11 +03:00
|
|
|
import escapeHtml from "escape-html";
|
2019-12-17 20:26:12 +03:00
|
|
|
import MatrixClientContext from "../../../contexts/MatrixClientContext";
|
2020-06-03 04:07:46 +03:00
|
|
|
import {Action} from "../../../dispatcher/actions";
|
2020-07-17 00:46:49 +03:00
|
|
|
import sanitizeHtml from "sanitize-html";
|
2017-12-10 15:50:41 +03:00
|
|
|
|
2018-02-19 17:27:10 +03:00
|
|
|
// This component does no cycle detection, simply because the only way to make such a cycle would be to
|
|
|
|
// craft event_id's, using a homeserver that generates predictable event IDs; even then the impact would
|
|
|
|
// be low as each event being loaded (after the first) is triggered by an explicit user action.
|
2018-03-04 15:39:34 +03:00
|
|
|
export default class ReplyThread extends React.Component {
|
2017-12-17 23:20:45 +03:00
|
|
|
static propTypes = {
|
2018-02-19 17:27:10 +03:00
|
|
|
// the latest event in this chain of replies
|
2017-12-15 21:39:01 +03:00
|
|
|
parentEv: PropTypes.instanceOf(MatrixEvent),
|
2018-04-27 13:28:17 +03:00
|
|
|
// called when the ReplyThread contents has changed, including EventTiles thereof
|
2019-03-06 14:27:16 +03:00
|
|
|
onHeightChanged: PropTypes.func.isRequired,
|
2019-03-01 12:36:36 +03:00
|
|
|
permalinkCreator: PropTypes.instanceOf(RoomPermalinkCreator).isRequired,
|
2020-05-05 12:54:44 +03:00
|
|
|
// Specifies which layout to use.
|
|
|
|
useIRCLayout: PropTypes.bool,
|
2017-12-17 23:20:45 +03:00
|
|
|
};
|
2017-12-10 15:50:41 +03:00
|
|
|
|
2019-12-17 20:26:12 +03:00
|
|
|
static contextType = MatrixClientContext;
|
2018-04-27 13:30:47 +03:00
|
|
|
|
2019-12-17 20:26:12 +03:00
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
2017-12-10 15:50:41 +03:00
|
|
|
|
2018-02-10 14:19:43 +03:00
|
|
|
this.state = {
|
|
|
|
// The loaded events to be rendered as linear-replies
|
|
|
|
events: [],
|
|
|
|
|
|
|
|
// The latest loaded event which has not yet been shown
|
|
|
|
loadedEv: null,
|
|
|
|
// Whether the component is still loading more events
|
|
|
|
loading: true,
|
|
|
|
|
|
|
|
// Whether as error was encountered fetching a replied to event.
|
2018-02-10 18:45:42 +03:00
|
|
|
err: false,
|
2017-12-10 15:50:41 +03:00
|
|
|
};
|
2017-12-18 22:28:01 +03:00
|
|
|
|
2018-01-10 14:51:23 +03:00
|
|
|
this.onQuoteClick = this.onQuoteClick.bind(this);
|
2018-04-13 14:28:58 +03:00
|
|
|
this.canCollapse = this.canCollapse.bind(this);
|
|
|
|
this.collapse = this.collapse.bind(this);
|
2017-12-17 23:20:45 +03:00
|
|
|
}
|
|
|
|
|
2018-04-27 13:44:14 +03:00
|
|
|
static getParentEventId(ev) {
|
2018-03-04 15:39:34 +03:00
|
|
|
if (!ev || ev.isRedacted()) return;
|
2018-01-22 19:34:47 +03:00
|
|
|
|
2019-05-15 15:46:32 +03:00
|
|
|
// XXX: For newer relations (annotations, replacements, etc.), we now
|
|
|
|
// have a `getRelation` helper on the event, and you might assume it
|
|
|
|
// could be used here for replies as well... However, the helper
|
|
|
|
// currently assumes the relation has a `rel_type`, which older replies
|
|
|
|
// do not, so this block is left as-is for now.
|
2018-02-10 15:31:22 +03:00
|
|
|
const mRelatesTo = ev.getWireContent()['m.relates_to'];
|
2018-02-11 14:45:13 +03:00
|
|
|
if (mRelatesTo && mRelatesTo['m.in_reply_to']) {
|
2018-02-10 15:31:22 +03:00
|
|
|
const mInReplyTo = mRelatesTo['m.in_reply_to'];
|
2018-04-27 13:44:14 +03:00
|
|
|
if (mInReplyTo && mInReplyTo['event_id']) return mInReplyTo['event_id'];
|
2018-01-22 19:41:32 +03:00
|
|
|
}
|
2018-02-10 14:19:43 +03:00
|
|
|
}
|
2018-01-22 19:34:47 +03:00
|
|
|
|
2018-03-04 15:39:34 +03:00
|
|
|
// Part of Replies fallback support
|
|
|
|
static stripPlainReply(body) {
|
2018-04-27 14:12:01 +03:00
|
|
|
// Removes lines beginning with `> ` until you reach one that doesn't.
|
2018-03-04 15:39:34 +03:00
|
|
|
const lines = body.split('\n');
|
2018-03-06 18:17:57 +03:00
|
|
|
while (lines.length && lines[0].startsWith('> ')) lines.shift();
|
2018-04-27 14:12:01 +03:00
|
|
|
// Reply fallback has a blank line after it, so remove it to prevent leading newline
|
|
|
|
if (lines[0] === '') lines.shift();
|
2018-03-04 15:39:34 +03:00
|
|
|
return lines.join('\n');
|
|
|
|
}
|
|
|
|
|
|
|
|
// Part of Replies fallback support
|
|
|
|
static stripHTMLReply(html) {
|
2020-07-17 00:46:49 +03:00
|
|
|
// Sanitize the original HTML for inclusion in <mx-reply>. We allow
|
|
|
|
// any HTML, since the original sender could use special tags that we
|
|
|
|
// don't recognize, but want to pass along to any recipients who do
|
|
|
|
// recognize them -- recipients should be sanitizing before displaying
|
|
|
|
// anyways. However, we sanitize to 1) remove any mx-reply, so that we
|
|
|
|
// don't generate a nested mx-reply, and 2) make sure that the HTML is
|
|
|
|
// properly formatted (e.g. tags are closed where necessary)
|
|
|
|
return sanitizeHtml(
|
|
|
|
html,
|
|
|
|
{
|
|
|
|
allowedTags: false, // false means allow everything
|
|
|
|
allowedAttributes: false,
|
|
|
|
exclusiveFilter: (frame) => frame.tag === "mx-reply",
|
2020-07-17 01:07:51 +03:00
|
|
|
},
|
2020-07-17 00:46:49 +03:00
|
|
|
);
|
2018-03-04 15:39:34 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
// Part of Replies fallback support
|
2019-02-25 18:08:07 +03:00
|
|
|
static getNestedReplyText(ev, permalinkCreator) {
|
2018-03-04 15:39:34 +03:00
|
|
|
if (!ev) return null;
|
|
|
|
|
|
|
|
let {body, formatted_body: html} = ev.getContent();
|
2018-04-27 13:44:14 +03:00
|
|
|
if (this.getParentEventId(ev)) {
|
2018-03-04 15:39:34 +03:00
|
|
|
if (body) body = this.stripPlainReply(body);
|
|
|
|
}
|
|
|
|
|
2019-11-09 02:07:11 +03:00
|
|
|
if (!body) body = ""; // Always ensure we have a body, for reasons.
|
|
|
|
|
2020-07-17 00:46:49 +03:00
|
|
|
if (html) {
|
|
|
|
// sanitize the HTML before we put it in an <mx-reply>
|
|
|
|
html = this.stripHTMLReply(html);
|
|
|
|
} else {
|
|
|
|
// Escape the body to use as HTML below.
|
|
|
|
// We also run a nl2br over the result to fix the fallback representation. We do this
|
|
|
|
// after converting the text to safe HTML to avoid user-provided BR's from being converted.
|
|
|
|
html = escapeHtml(body).replace(/\n/g, '<br/>');
|
|
|
|
}
|
2019-11-09 02:07:11 +03:00
|
|
|
|
|
|
|
// dev note: do not rely on `body` being safe for HTML usage below.
|
|
|
|
|
2019-02-25 18:08:07 +03:00
|
|
|
const evLink = permalinkCreator.forEvent(ev.getId());
|
2018-03-16 20:31:17 +03:00
|
|
|
const userLink = makeUserPermalink(ev.getSender());
|
|
|
|
const mxid = ev.getSender();
|
|
|
|
|
|
|
|
// This fallback contains text that is explicitly EN.
|
|
|
|
switch (ev.getContent().msgtype) {
|
|
|
|
case 'm.text':
|
|
|
|
case 'm.notice': {
|
2018-05-12 17:57:33 +03:00
|
|
|
html = `<mx-reply><blockquote><a href="${evLink}">In reply to</a> <a href="${userLink}">${mxid}</a>`
|
2019-11-09 02:07:11 +03:00
|
|
|
+ `<br>${html}</blockquote></mx-reply>`;
|
2018-03-16 20:31:17 +03:00
|
|
|
const lines = body.trim().split('\n');
|
|
|
|
if (lines.length > 0) {
|
|
|
|
lines[0] = `<${mxid}> ${lines[0]}`;
|
|
|
|
body = lines.map((line) => `> ${line}`).join('\n') + '\n\n';
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 'm.image':
|
2018-05-12 17:57:33 +03:00
|
|
|
html = `<mx-reply><blockquote><a href="${evLink}">In reply to</a> <a href="${userLink}">${mxid}</a>`
|
|
|
|
+ `<br>sent an image.</blockquote></mx-reply>`;
|
2018-04-20 12:15:15 +03:00
|
|
|
body = `> <${mxid}> sent an image.\n\n`;
|
2018-03-16 20:31:17 +03:00
|
|
|
break;
|
|
|
|
case 'm.video':
|
2018-05-12 17:57:33 +03:00
|
|
|
html = `<mx-reply><blockquote><a href="${evLink}">In reply to</a> <a href="${userLink}">${mxid}</a>`
|
|
|
|
+ `<br>sent a video.</blockquote></mx-reply>`;
|
2018-04-20 12:15:15 +03:00
|
|
|
body = `> <${mxid}> sent a video.\n\n`;
|
2018-03-16 20:31:17 +03:00
|
|
|
break;
|
|
|
|
case 'm.audio':
|
2018-05-12 17:57:33 +03:00
|
|
|
html = `<mx-reply><blockquote><a href="${evLink}">In reply to</a> <a href="${userLink}">${mxid}</a>`
|
|
|
|
+ `<br>sent an audio file.</blockquote></mx-reply>`;
|
2018-04-20 12:15:15 +03:00
|
|
|
body = `> <${mxid}> sent an audio file.\n\n`;
|
2018-03-16 20:31:17 +03:00
|
|
|
break;
|
|
|
|
case 'm.file':
|
2018-05-12 17:57:33 +03:00
|
|
|
html = `<mx-reply><blockquote><a href="${evLink}">In reply to</a> <a href="${userLink}">${mxid}</a>`
|
|
|
|
+ `<br>sent a file.</blockquote></mx-reply>`;
|
2018-04-20 12:15:15 +03:00
|
|
|
body = `> <${mxid}> sent a file.\n\n`;
|
2018-03-16 20:31:17 +03:00
|
|
|
break;
|
|
|
|
case 'm.emote': {
|
2018-05-12 17:57:33 +03:00
|
|
|
html = `<mx-reply><blockquote><a href="${evLink}">In reply to</a> * `
|
2019-11-09 02:07:11 +03:00
|
|
|
+ `<a href="${userLink}">${mxid}</a><br>${html}</blockquote></mx-reply>`;
|
2018-03-16 20:31:17 +03:00
|
|
|
const lines = body.trim().split('\n');
|
|
|
|
if (lines.length > 0) {
|
|
|
|
lines[0] = `* <${mxid}> ${lines[0]}`;
|
|
|
|
body = lines.map((line) => `> ${line}`).join('\n') + '\n\n';
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
default:
|
|
|
|
return null;
|
2018-03-10 02:37:42 +03:00
|
|
|
}
|
2018-03-04 15:39:34 +03:00
|
|
|
|
|
|
|
return {body, html};
|
|
|
|
}
|
|
|
|
|
2018-04-27 13:47:18 +03:00
|
|
|
static makeReplyMixIn(ev) {
|
2018-02-20 02:42:04 +03:00
|
|
|
if (!ev) return {};
|
2018-02-10 14:19:43 +03:00
|
|
|
return {
|
|
|
|
'm.relates_to': {
|
|
|
|
'm.in_reply_to': {
|
|
|
|
'event_id': ev.getId(),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
2017-12-17 23:20:45 +03:00
|
|
|
}
|
2017-12-10 15:50:41 +03:00
|
|
|
|
2020-05-18 18:57:00 +03:00
|
|
|
static makeThread(parentEv, onHeightChanged, permalinkCreator, ref, useIRCLayout) {
|
2018-06-20 11:57:11 +03:00
|
|
|
if (!ReplyThread.getParentEventId(parentEv)) {
|
2020-05-06 11:51:01 +03:00
|
|
|
return <div className="mx_ReplyThread_wrapper_empty" />;
|
2018-03-04 15:39:34 +03:00
|
|
|
}
|
2020-05-07 16:22:15 +03:00
|
|
|
return <ReplyThread
|
|
|
|
parentEv={parentEv}
|
|
|
|
onHeightChanged={onHeightChanged}
|
|
|
|
ref={ref}
|
|
|
|
permalinkCreator={permalinkCreator}
|
|
|
|
useIRCLayout={useIRCLayout}
|
2020-05-18 18:57:00 +03:00
|
|
|
/>;
|
2017-12-18 22:28:01 +03:00
|
|
|
}
|
|
|
|
|
2020-03-31 23:14:17 +03:00
|
|
|
componentDidMount() {
|
2018-04-29 02:54:54 +03:00
|
|
|
this.unmounted = false;
|
2019-12-17 20:26:12 +03:00
|
|
|
this.room = this.context.getRoom(this.props.parentEv.getRoomId());
|
2019-08-13 20:13:47 +03:00
|
|
|
this.room.on("Room.redaction", this.onRoomRedaction);
|
|
|
|
// same event handler as Room.redaction as for both we just do forceUpdate
|
|
|
|
this.room.on("Room.redactionCancelled", this.onRoomRedaction);
|
2018-04-29 02:54:54 +03:00
|
|
|
this.initialize();
|
|
|
|
}
|
|
|
|
|
|
|
|
componentDidUpdate() {
|
2019-03-06 14:27:16 +03:00
|
|
|
this.props.onHeightChanged();
|
2018-04-29 02:54:54 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
componentWillUnmount() {
|
|
|
|
this.unmounted = true;
|
2019-08-13 20:13:47 +03:00
|
|
|
if (this.room) {
|
|
|
|
this.room.removeListener("Room.redaction", this.onRoomRedaction);
|
|
|
|
this.room.removeListener("Room.redactionCancelled", this.onRoomRedaction);
|
|
|
|
}
|
2018-04-29 02:54:54 +03:00
|
|
|
}
|
|
|
|
|
2019-08-13 20:13:47 +03:00
|
|
|
onRoomRedaction = (ev, room) => {
|
|
|
|
if (this.unmounted) return;
|
|
|
|
|
2019-08-15 01:27:04 +03:00
|
|
|
// If one of the events we are rendering gets redacted, force a re-render
|
|
|
|
if (this.state.events.some(event => event.getId() === ev.getId())) {
|
|
|
|
this.forceUpdate();
|
|
|
|
}
|
2019-08-13 20:13:47 +03:00
|
|
|
};
|
|
|
|
|
2018-05-01 19:42:58 +03:00
|
|
|
async initialize() {
|
|
|
|
const {parentEv} = this.props;
|
|
|
|
// at time of making this component we checked that props.parentEv has a parentEventId
|
2018-05-03 16:32:13 +03:00
|
|
|
const ev = await this.getEvent(ReplyThread.getParentEventId(parentEv));
|
2018-05-01 19:42:58 +03:00
|
|
|
if (this.unmounted) return;
|
|
|
|
|
|
|
|
if (ev) {
|
|
|
|
this.setState({
|
|
|
|
events: [ev],
|
|
|
|
}, this.loadNextEvent);
|
|
|
|
} else {
|
|
|
|
this.setState({err: true});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
async loadNextEvent() {
|
|
|
|
if (this.unmounted) return;
|
|
|
|
const ev = this.state.events[0];
|
|
|
|
const inReplyToEventId = ReplyThread.getParentEventId(ev);
|
|
|
|
|
|
|
|
if (!inReplyToEventId) {
|
|
|
|
this.setState({
|
|
|
|
loading: false,
|
|
|
|
});
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2018-05-03 16:32:13 +03:00
|
|
|
const loadedEv = await this.getEvent(inReplyToEventId);
|
2018-05-01 19:42:58 +03:00
|
|
|
if (this.unmounted) return;
|
|
|
|
|
|
|
|
if (loadedEv) {
|
|
|
|
this.setState({loadedEv});
|
|
|
|
} else {
|
|
|
|
this.setState({err: true});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-05-03 16:32:13 +03:00
|
|
|
async getEvent(eventId) {
|
|
|
|
const event = this.room.findEventById(eventId);
|
|
|
|
if (event) return event;
|
|
|
|
|
|
|
|
try {
|
|
|
|
// ask the client to fetch the event we want using the context API, only interface to do so is to ask
|
|
|
|
// for a timeline with that event, but once it is loaded we can use findEventById to look up the ev map
|
2019-12-17 20:26:12 +03:00
|
|
|
await this.context.getEventTimeline(this.room.getUnfilteredTimelineSet(), eventId);
|
2018-05-03 16:32:13 +03:00
|
|
|
} catch (e) {
|
|
|
|
// if it fails catch the error and return early, there's no point trying to find the event in this case.
|
|
|
|
// Return null as it is falsey and thus should be treated as an error (as the event cannot be resolved).
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
return this.room.findEventById(eventId);
|
|
|
|
}
|
|
|
|
|
2018-04-29 02:54:54 +03:00
|
|
|
canCollapse() {
|
|
|
|
return this.state.events.length > 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
collapse() {
|
|
|
|
this.initialize();
|
|
|
|
}
|
|
|
|
|
|
|
|
onQuoteClick() {
|
|
|
|
const events = [this.state.loadedEv, ...this.state.events];
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
loadedEv: null,
|
|
|
|
events,
|
|
|
|
}, this.loadNextEvent);
|
|
|
|
|
2020-06-03 04:07:46 +03:00
|
|
|
dis.fire(Action.FocusComposer);
|
2018-04-29 02:54:54 +03:00
|
|
|
}
|
|
|
|
|
2017-12-17 23:20:45 +03:00
|
|
|
render() {
|
2018-02-10 14:19:43 +03:00
|
|
|
let header = null;
|
2018-02-10 18:45:42 +03:00
|
|
|
|
|
|
|
if (this.state.err) {
|
2018-02-20 18:40:19 +03:00
|
|
|
header = <blockquote className="mx_ReplyThread mx_ReplyThread_error">
|
2018-02-10 18:45:42 +03:00
|
|
|
{
|
|
|
|
_t('Unable to load event that was replied to, ' +
|
|
|
|
'it either does not exist or you do not have permission to view it.')
|
|
|
|
}
|
|
|
|
</blockquote>;
|
|
|
|
} else if (this.state.loadedEv) {
|
2018-02-10 14:19:43 +03:00
|
|
|
const ev = this.state.loadedEv;
|
|
|
|
const Pill = sdk.getComponent('elements.Pill');
|
2019-12-17 20:26:12 +03:00
|
|
|
const room = this.context.getRoom(ev.getRoomId());
|
2018-02-20 18:40:19 +03:00
|
|
|
header = <blockquote className="mx_ReplyThread">
|
2018-02-10 14:19:43 +03:00
|
|
|
{
|
|
|
|
_t('<a>In reply to</a> <pill>', {}, {
|
2018-02-20 18:40:19 +03:00
|
|
|
'a': (sub) => <a onClick={this.onQuoteClick} className="mx_ReplyThread_show">{ sub }</a>,
|
2018-02-10 14:19:43 +03:00
|
|
|
'pill': <Pill type={Pill.TYPE_USER_MENTION} room={room}
|
|
|
|
url={makeUserPermalink(ev.getSender())} shouldShowPillAvatar={true} />,
|
|
|
|
})
|
2017-12-18 22:28:01 +03:00
|
|
|
}
|
2018-02-10 14:19:43 +03:00
|
|
|
</blockquote>;
|
|
|
|
} else if (this.state.loading) {
|
2018-02-10 18:45:42 +03:00
|
|
|
const Spinner = sdk.getComponent("elements.Spinner");
|
2018-02-10 18:47:32 +03:00
|
|
|
header = <Spinner w={16} h={16} />;
|
2018-02-10 14:19:43 +03:00
|
|
|
}
|
2017-12-18 22:28:01 +03:00
|
|
|
|
2018-02-10 14:19:43 +03:00
|
|
|
const EventTile = sdk.getComponent('views.rooms.EventTile');
|
|
|
|
const DateSeparator = sdk.getComponent('messages.DateSeparator');
|
|
|
|
const evTiles = this.state.events.map((ev) => {
|
|
|
|
let dateSep = null;
|
2017-12-15 21:39:01 +03:00
|
|
|
|
2018-02-10 14:19:43 +03:00
|
|
|
if (wantsDateSeparator(this.props.parentEv.getDate(), ev.getDate())) {
|
|
|
|
dateSep = <a href={this.props.url}><DateSeparator ts={ev.getTs()} /></a>;
|
|
|
|
}
|
|
|
|
|
2018-02-20 18:40:19 +03:00
|
|
|
return <blockquote className="mx_ReplyThread" key={ev.getId()}>
|
2018-02-10 14:19:43 +03:00
|
|
|
{ dateSep }
|
2019-08-13 20:13:47 +03:00
|
|
|
<EventTile
|
|
|
|
mxEvent={ev}
|
|
|
|
tileShape="reply"
|
|
|
|
onHeightChanged={this.props.onHeightChanged}
|
|
|
|
permalinkCreator={this.props.permalinkCreator}
|
|
|
|
isRedacted={ev.isRedacted()}
|
2020-05-05 12:54:44 +03:00
|
|
|
isTwelveHour={SettingsStore.getValue("showTwelveHourTimestamps")}
|
2020-05-07 15:55:23 +03:00
|
|
|
useIRCLayout={this.props.useIRCLayout}
|
|
|
|
/>
|
2018-02-10 14:19:43 +03:00
|
|
|
</blockquote>;
|
|
|
|
});
|
2017-12-10 15:54:19 +03:00
|
|
|
|
2020-05-05 18:24:50 +03:00
|
|
|
return <div className="mx_ReplyThread_wrapper">
|
2018-02-10 14:19:43 +03:00
|
|
|
<div>{ header }</div>
|
|
|
|
<div>{ evTiles }</div>
|
|
|
|
</div>;
|
2017-12-17 23:20:45 +03:00
|
|
|
}
|
|
|
|
}
|