Skip to content

Commit 2b1cfae

Browse files
committed
tomatrix: fix sticker metadata
1 parent 274141a commit 2b1cfae

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pkg/connector/tomatrix.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"encoding/binary"
2323
"fmt"
2424
"html"
25+
"strconv"
2526
"strings"
2627
"time"
2728

@@ -422,12 +423,12 @@ func (c *TelegramClient) convertMediaRequiringUpload(
422423
content.FileName = content.Body
423424
content.Body = a.Alt
424425
}
425-
stickerInfo := map[string]any{"alt": a.Alt, "id": document.ID}
426+
stickerInfo := map[string]any{"alt": a.Alt, "id": strconv.FormatInt(document.ID, 10)}
426427

427428
if setID, ok := a.Stickerset.(*tg.InputStickerSetID); ok {
428429
stickerInfo["pack"] = map[string]any{
429-
"id": setID.ID,
430-
"access_hash": setID.AccessHash,
430+
"id": strconv.FormatInt(setID.ID, 10),
431+
"access_hash": strconv.FormatInt(setID.AccessHash, 10),
431432
}
432433
} else if shortName, ok := a.Stickerset.(*tg.InputStickerSetShortName); ok {
433434
stickerInfo["pack"] = map[string]any{

0 commit comments

Comments
 (0)