summaryrefslogtreecommitdiff
path: root/sent.go
diff options
context:
space:
mode:
Diffstat (limited to 'sent.go')
-rw-r--r--sent.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/sent.go b/sent.go
index 0c72e6b..f21b791 100644
--- a/sent.go
+++ b/sent.go
@@ -54,6 +54,9 @@ func removeDelisted(sent []flat, allFlats []flat) []flat {
}
func writeSent(sent []flat, filename string) error {
+ if !slices.IsSortedFunc(sent, compareID) {
+ slices.SortFunc(sent, compareID)
+ }
jsonData, err := json.Marshal(sent)
if err != nil {
return err