From a55c4a2a5252e9b56990543ddc05d3ca1dfde623 Mon Sep 17 00:00:00 2001 From: wmwragg Date: Thu, 18 Aug 2016 21:53:37 +0100 Subject: [PATCH] Initial pass at the /me and action messages, without name highlighting, and missing avatar for continuation messages after a /me or action message --- src/components/views/rooms/EventTile.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/components/views/rooms/EventTile.js b/src/components/views/rooms/EventTile.js index 0222f7bfc3..cf013c0ae4 100644 --- a/src/components/views/rooms/EventTile.js +++ b/src/components/views/rooms/EventTile.js @@ -362,6 +362,8 @@ module.exports = React.createClass({ var content = this.props.mxEvent.getContent(); var msgtype = content.msgtype; + var eventType = this.props.mxEvent.getType(); + var isInfoMessage = (msgtype === 'm.emote' || eventType !== 'm.room.message'); var EventTileType = sdk.getComponent(eventTileTypes[this.props.mxEvent.getType()]); // This shouldn't happen: the caller should check we support this type @@ -372,6 +374,7 @@ module.exports = React.createClass({ var classes = classNames({ mx_EventTile: true, + mx_EventTile_info: isInfoMessage, mx_EventTile_sending: ['sending', 'queued'].indexOf( this.props.eventSendStatus ) !== -1, @@ -397,12 +400,17 @@ module.exports = React.createClass({ var readAvatars = this.getReadAvatars(); var avatar, sender; - if (!this.props.continuation) { + if (isInfoMessage) { + avatar = ( +
+ +
+ ); + } else if (!this.props.continuation) { if (this.props.mxEvent.sender) { avatar = (
- +
); }