aboutsummaryrefslogtreecommitdiff
path: root/telegram/client.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2024-01-29 12:28:15 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2024-01-29 12:28:15 +0300
commitea004b7f7c11fa0ddf560317fd9d6f9b2869144a (patch)
tree96157b08b5db8fde4088fde0cf1515be0c73bf6a /telegram/client.go
parentc141c4ad2bebe51562be0a7cfe0671f34b0a49fb (diff)
Reflect Telegram edits natively by nativeedits option
Diffstat (limited to 'telegram/client.go')
-rw-r--r--telegram/client.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/telegram/client.go b/telegram/client.go
index 38dff4c..79f27d5 100644
--- a/telegram/client.go
+++ b/telegram/client.go
@@ -45,6 +45,7 @@ type Client struct {
DelayedStatusesLock sync.Mutex
lastMsgHashes map[int64]uint64
+ lastMsgIds map[int64]string
msgHashSeed maphash.Seed
locks clientLocks
@@ -58,6 +59,7 @@ type clientLocks struct {
outboxLock sync.Mutex
editOutboxLock sync.Mutex
lastMsgHashesLock sync.Mutex
+ lastMsgIdsLock sync.RWMutex
authorizerReadLock sync.Mutex
authorizerWriteLock sync.Mutex
@@ -119,6 +121,7 @@ func NewClient(conf config.TelegramConfig, jid string, component *xmpp.Component
options: options,
DelayedStatuses: make(map[int64]*DelayedStatus),
lastMsgHashes: make(map[int64]uint64),
+ lastMsgIds: make(map[int64]string),
msgHashSeed: maphash.MakeSeed(),
locks: clientLocks{
chatMessageLocks: make(map[int64]*sync.Mutex),