reactions: use ReactionSync event

Signed-off-by: Sumner Evans <sumner.evans@automattic.com>
This commit is contained in:
Sumner Evans
2024-08-05 14:45:15 -06:00
parent f56f520308
commit 18337c6941
4 changed files with 60 additions and 151 deletions
-4
View File
@@ -8,7 +8,6 @@ import (
"slices"
"strconv"
"strings"
"sync"
"github.com/gotd/td/telegram"
"github.com/gotd/td/telegram/updates"
@@ -39,8 +38,6 @@ type TelegramClient struct {
client *telegram.Client
clientCancel context.CancelFunc
reactionMessageLocks map[int]*sync.Mutex
appConfig map[string]any
appConfigHash int
@@ -151,7 +148,6 @@ func NewTelegramClient(ctx context.Context, tc *TelegramConnector, login *bridge
UpdateHandler: updatesManager,
})
client.clientCancel, err = connectTelegramClient(ctx, client.client)
client.reactionMessageLocks = map[int]*sync.Mutex{}
client.telegramFmtParams = &telegramfmt.FormatParams{
GetUserInfoByID: func(ctx context.Context, id int64) (telegramfmt.UserInfo, error) {