mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Fix case preview in !cases when two or more of the first case notes have the same timestamp
This commit is contained in:
parent
9f7f87dc77
commit
c38c2cc904
1 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@ import {
|
|||
errorMessage,
|
||||
findRelevantAuditLogEntry,
|
||||
INotifyUserResult,
|
||||
multiSorter,
|
||||
notifyUser,
|
||||
NotifyUserStatus,
|
||||
stripObjectToScalars,
|
||||
|
@ -1272,7 +1273,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<IModActionsPluginConfig> {
|
|||
// Compact view (= regular message with a preview of each case)
|
||||
const lines = [];
|
||||
for (const theCase of casesToDisplay) {
|
||||
theCase.notes.sort((a, b) => (a.created_at > b.created_at ? 1 : -1));
|
||||
theCase.notes.sort(multiSorter(["created_at", "id"]));
|
||||
const caseSummary = this.cases.getSummaryText(theCase);
|
||||
lines.push(caseSummary);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue