mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-21 14:31:09 +02:00
Revert "Handle non-m.room.message event types."
This reverts commit f8d7ab10fab9c742f2351477e698d5f6b0e6a5d1.
This commit is contained in:
parent
fb9b376cb8
commit
008572afe1
@ -450,12 +450,7 @@ module.exports = React.createClass({
|
|||||||
if (prevEvent !== null
|
if (prevEvent !== null
|
||||||
&& prevEvent.sender && mxEv.sender
|
&& prevEvent.sender && mxEv.sender
|
||||||
&& mxEv.sender.userId === prevEvent.sender.userId
|
&& mxEv.sender.userId === prevEvent.sender.userId
|
||||||
// The preferred way of checking for 'continuation messages' is by
|
&& mxEv.getType() == prevEvent.getType()) {
|
||||||
// checking whether subsiquent messages from the same user have a
|
|
||||||
// message body. This is because all messages intended to be displayed
|
|
||||||
// should have a 'body' whereas some (non-m.room) messages (such as
|
|
||||||
// m.sticker) may not have a message 'type'.
|
|
||||||
&& Boolean(mxEv.getContent().body) == Boolean(prevEvent.getContent().body)) {
|
|
||||||
continuation = true;
|
continuation = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -471,8 +471,7 @@ module.exports = withMatrixClient(React.createClass({
|
|||||||
const eventType = this.props.mxEvent.getType();
|
const eventType = this.props.mxEvent.getType();
|
||||||
|
|
||||||
// Info messages are basically information about commands processed on a room
|
// Info messages are basically information about commands processed on a room
|
||||||
// For now assume that anything that doesn't have a content body is an isInfoMessage
|
const isInfoMessage = (eventType !== 'm.room.message' && eventType !== 'm.room.sticker');
|
||||||
const isInfoMessage = !content.body; // Boolean comparison of non-boolean content body
|
|
||||||
|
|
||||||
const EventTileType = sdk.getComponent(getHandlerTile(this.props.mxEvent));
|
const EventTileType = sdk.getComponent(getHandlerTile(this.props.mxEvent));
|
||||||
// This shouldn't happen: the caller should check we support this type
|
// This shouldn't happen: the caller should check we support this type
|
||||||
|
Loading…
x
Reference in New Issue
Block a user