Skip to content

Commit

Permalink
fix message grouping with locale-independent comparison method
Browse files Browse the repository at this point in the history
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
  • Loading branch information
Antreesy committed Oct 12, 2023
1 parent a3009bb commit d8a7580
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/MessagesList/MessagesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,8 @@ export default {
return false
}

// Only group messages within a short period of time, so unrelated messages are not grouped together
return (this.getDateOfMessage(message1).format('X') - this.getDateOfMessage(message2).format('X')) < 300
// Only group messages within a short period of time (5 minutes), so unrelated messages are not grouped together
return this.getDateOfMessage(message1).diff(this.getDateOfMessage(message2)) < 300 * 1000
},

/**
Expand Down

0 comments on commit d8a7580

Please sign in to comment.