Skip to content

Commit

Permalink
Don't group message with different alias
Browse files Browse the repository at this point in the history
  • Loading branch information
jungeonkim committed Apr 28, 2019
1 parent c43c136 commit f633b1b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/ui-message/client/message.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template name="message">
<li id="{{templatePrefix}}{{msg._id}}" data-id="{{msg._id}}" data-context={{actionContext}} class="message {{ignoredClass}} {{sequentialClass}} {{system}} {{t}} {{own}} {{isTemp}} {{chatops}} {{collapsed}} {{customClass}}" data-username="{{msg.u.username}}" data-tmid="{{msg.tmid}}" data-groupable="{{isGroupable}}" data-date="{{date}}" data-timestamp="{{timestamp}}">
<li id="{{templatePrefix}}{{msg._id}}" data-id="{{msg._id}}" data-context={{actionContext}} class="message {{ignoredClass}} {{sequentialClass}} {{system}} {{t}} {{own}} {{isTemp}} {{chatops}} {{collapsed}} {{customClass}}" data-username="{{msg.u.username}}" data-tmid="{{msg.tmid}}" data-groupable="{{isGroupable}}" data-date="{{date}}" data-timestamp="{{timestamp}}" data-alias="{{msg.alias}}">
{{#if isThreadReply}}
{{> messageThread parentMessage=parentMessage threadMessage=threadMessage following=msg.following avatar=msg.u.username msg=msg body=body class=bodyClass}}
{{else}}
Expand Down
4 changes: 4 additions & 0 deletions app/ui-message/client/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,10 @@ const isSequential = (currentNode, previousNode, forceDate, period, showDateSepa
return false;
}

if (previousDataset.alias !== currentDataset.alias) {
return false;
}

if (parseInt(currentDataset.timestamp) - parseInt(previousDataset.timestamp) <= period) {
return true;
}
Expand Down

0 comments on commit f633b1b

Please sign in to comment.