From 3b8cb421081b16cad549ea5b30131ea727ca7ef2 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sat, 26 Oct 2019 09:31:45 +0100 Subject: [PATCH] Fix Room Create ELS using MXID instead of newly set Displayname/Avatar --- src/components/structures/MessagePanel.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/structures/MessagePanel.js b/src/components/structures/MessagePanel.js index 7254059734..cf2a5b1738 100644 --- a/src/components/structures/MessagePanel.js +++ b/src/components/structures/MessagePanel.js @@ -443,15 +443,17 @@ module.exports = createReactClass({ // one was itself. This way, the timestamp of the previous event === the // timestamp of the current event, and no DateSeparator is inserted. return this._getTilesForEvent(e, e, e === lastShownEvent); - }).reduce((a, b) => a.concat(b)); + }).reduce((a, b) => a.concat(b), []); + // Get sender profile from the latest event in the summary as the m.room.create doesn't contain one + const ev = this.props.events[i]; ret.push( { eventTiles } @@ -529,7 +531,7 @@ module.exports = createReactClass({ // one was itself. This way, the timestamp of the previous event === the // timestamp of the current event, and no DateSeparator is inserted. return this._getTilesForEvent(e, e, e === lastShownEvent); - }).reduce((a, b) => a.concat(b)); + }).reduce((a, b) => a.concat(b), []); if (eventTiles.length === 0) { eventTiles = null;