Add comment.

This commit is contained in:
Richard Lewis 2018-03-29 21:31:09 +01:00
parent 003cf61388
commit ff0834ad9d

View File

@ -450,7 +450,12 @@ module.exports = React.createClass({
if (prevEvent !== null
&& prevEvent.sender && mxEv.sender
&& mxEv.sender.userId === prevEvent.sender.userId
&& Boolean(mxEv.getContent().body) == Boolean(prevEvent.getContent().body)) {
// The preferred way of checking for 'continuation messages' is by
// 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;
}