diff --git a/src/components/views/elements/ReplyThread.js b/src/components/views/elements/ReplyThread.js index 138431259f..c7ca4b2d41 100644 --- a/src/components/views/elements/ReplyThread.js +++ b/src/components/views/elements/ReplyThread.js @@ -97,7 +97,7 @@ export default class ReplyThread extends React.Component { // Part of Replies fallback support static stripHTMLReply(html) { - return html.replace(/^
[\s\S]+?<\/blockquote>/, ''); + return html.replace(/^
[\s\S]+?<\/blockquote>/, ''); } // Part of Replies fallback support @@ -119,7 +119,7 @@ export default class ReplyThread extends React.Component { case 'm.text': case 'm.notice': { html = `
In reply to ${mxid}` - + `
${html || body}
`; + + `
${html || body}
`; const lines = body.trim().split('\n'); if (lines.length > 0) { lines[0] = `<${mxid}> ${lines[0]}`; @@ -129,27 +129,27 @@ export default class ReplyThread extends React.Component { } case 'm.image': html = `
In reply to ${mxid}` - + `
sent an image.
`; + + `
sent an image.
`; body = `> <${mxid}> sent an image.\n\n`; break; case 'm.video': html = `
In reply to ${mxid}` - + `
sent a video.
`; + + `
sent a video.`; body = `> <${mxid}> sent a video.\n\n`; break; case 'm.audio': html = `
In reply to ${mxid}` - + `
sent an audio file.
`; + + `
sent an audio file.`; body = `> <${mxid}> sent an audio file.\n\n`; break; case 'm.file': html = `
In reply to ${mxid}` - + `
sent a file.
`; + + `
sent a file.`; body = `> <${mxid}> sent a file.\n\n`; break; case 'm.emote': { html = `
In reply to * ` - + `${mxid}
${html || body}
`; + + `${mxid}
${html || body}`; const lines = body.trim().split('\n'); if (lines.length > 0) { lines[0] = `* <${mxid}> ${lines[0]}`; diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index c7150da67c..bfcf8ac9d4 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -155,9 +155,11 @@ module.exports = withMatrixClient(React.createClass({ isTwelveHour: PropTypes.bool, }, - defaultProps: { - // no-op function because onWidgetLoad is optional yet some subcomponents assume its existence - onWidgetLoad: function() {}, + getDefaultProps: function() { + return { + // no-op function because onWidgetLoad is optional yet some sub-components assume its existence + onWidgetLoad: function() {}, + }; }, getInitialState: function() {