Handle non-m.room.message event types.

pull/21833/head
Richard Lewis 2018-01-17 17:19:20 +00:00
parent b6f85fbf92
commit f8d7ab10fa
2 changed files with 3 additions and 2 deletions

View File

@ -450,7 +450,7 @@ module.exports = React.createClass({
if (prevEvent !== null
&& prevEvent.sender && mxEv.sender
&& mxEv.sender.userId === prevEvent.sender.userId
&& mxEv.getType() == prevEvent.getType()) {
&& Boolean(mxEv.getContent().body) == Boolean(prevEvent.getContent().body)) {
continuation = true;
}

View File

@ -440,7 +440,8 @@ module.exports = withMatrixClient(React.createClass({
const eventType = this.props.mxEvent.getType();
// Info messages are basically information about commands processed on a room
const isInfoMessage = (eventType !== 'm.room.message' && eventType !== 'm.room.sticker');
// For now assume that anything that doesn't have a content body is an isInfoMessage
const isInfoMessage = !content.body; // Boolean comparison of non-boolean content body
const EventTileType = sdk.getComponent(getHandlerTile(this.props.mxEvent));
// This shouldn't happen: the caller should check we support this type