aboutsummaryrefslogtreecommitdiff
path: root/telegram/formatter/formatter.go
diff options
context:
space:
mode:
Diffstat (limited to 'telegram/formatter/formatter.go')
-rw-r--r--telegram/formatter/formatter.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/telegram/formatter/formatter.go b/telegram/formatter/formatter.go
index d6541cb..53b4625 100644
--- a/telegram/formatter/formatter.go
+++ b/telegram/formatter/formatter.go
@@ -59,8 +59,8 @@ func SortEntities(entities []*client.TextEntity) []*client.TextEntity {
copy(sortedEntities, entities)
sort.Slice(sortedEntities, func(i int, j int) bool {
- entity1 := entities[i]
- entity2 := entities[j]
+ entity1 := sortedEntities[i]
+ entity2 := sortedEntities[j]
if entity1.Offset < entity2.Offset {
return true
} else if entity1.Offset == entity2.Offset {