Updated the MessagePanel to now take account of /me messages when working out if an event is a continuation message or not
This commit is contained in:
parent
a55c4a2a52
commit
ddda435e9e
1 changed files with 12 additions and 0 deletions
|
@ -337,6 +337,18 @@ module.exports = React.createClass({
|
|||
continuation = true;
|
||||
}
|
||||
|
||||
// Work out if this is still a continuation, as we are now showing commands
|
||||
// and /me messages with their own little avatar. The case of a change of
|
||||
// event type (commands) is handled above, but we need to handle the /me
|
||||
// messages seperately as they have a msgtype of 'm.emote' but are classed
|
||||
// as normal messages
|
||||
if (prevEvent !== null && prevEvent.sender && mxEv.sender
|
||||
&& mxEv.sender.userId === prevEvent.sender.userId
|
||||
&& mxEv.getType() == prevEvent.getType()
|
||||
&& prevEvent.getContent().msgtype === 'm.emote') {
|
||||
continuation = false;
|
||||
}
|
||||
|
||||
// local echoes have a fake date, which could even be yesterday. Treat them
|
||||
// as 'today' for the date separators.
|
||||
var ts1 = mxEv.getTs();
|
||||
|
|
Loading…
Reference in a new issue