diff options
Diffstat (limited to 'telegram/client.go')
-rw-r--r-- | telegram/client.go | 3 |
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), |