mirror of https://github.com/vector-im/riot-web
If only one mevent, return than one
Also, the net change of nil is detected as having the first and last events being _different_. The summary should only include those that have their first and last events being the _same_ because that is a net change (within the block of member events).pull/21833/head
parent
beecbc7cd7
commit
324448563a
|
@ -162,10 +162,15 @@ module.exports = React.createClass({
|
|||
return e.getSender() === userId;
|
||||
});
|
||||
|
||||
if (userEvents.length === 1) {
|
||||
filteredEvents.push(userEvents[0]);
|
||||
return;
|
||||
}
|
||||
|
||||
let firstEvent = userEvents[0];
|
||||
let lastEvent = userEvents[userEvents.length - 1];
|
||||
|
||||
if (firstEvent.getContent().membership !== lastEvent.getContent().membership) {
|
||||
if (firstEvent.getContent().membership === lastEvent.getContent().membership) {
|
||||
filteredEvents.push(lastEvent);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue