mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 22:21: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,
|
errorMessage,
|
||||||
findRelevantAuditLogEntry,
|
findRelevantAuditLogEntry,
|
||||||
INotifyUserResult,
|
INotifyUserResult,
|
||||||
|
multiSorter,
|
||||||
notifyUser,
|
notifyUser,
|
||||||
NotifyUserStatus,
|
NotifyUserStatus,
|
||||||
stripObjectToScalars,
|
stripObjectToScalars,
|
||||||
|
@ -1272,7 +1273,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<IModActionsPluginConfig> {
|
||||||
// Compact view (= regular message with a preview of each case)
|
// Compact view (= regular message with a preview of each case)
|
||||||
const lines = [];
|
const lines = [];
|
||||||
for (const theCase of casesToDisplay) {
|
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);
|
const caseSummary = this.cases.getSummaryText(theCase);
|
||||||
lines.push(caseSummary);
|
lines.push(caseSummary);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue