Skip to content

Commit

Permalink
Fix message ID sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffyanta committed Jun 12, 2024
1 parent c7a4b53 commit f2135f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/code/data/chat/v2/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ type MessagesById []*MessageRecord
func (a MessagesById) Len() int { return len(a) }
func (a MessagesById) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (a MessagesById) Less(i, j int) bool {
return a[i].MessageId.Before(a[i].MessageId)
return a[i].MessageId.Before(a[j].MessageId)
}

// GetChatIdFromProto gets a chat ID from the protobuf variant
Expand Down

0 comments on commit f2135f0

Please sign in to comment.