aboutsummaryrefslogtreecommitdiff
path: root/telegram/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'telegram/client.go')
-rw-r--r--telegram/client.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/telegram/client.go b/telegram/client.go
index dde15f2..7e7cdc8 100644
--- a/telegram/client.go
+++ b/telegram/client.go
@@ -55,6 +55,7 @@ type Client struct {
type clientLocks struct {
authorizationReady sync.WaitGroup
+ chatMessageLocks map[int64]*sync.Mutex
}
// NewClient instantiates a Telegram App
@@ -107,6 +108,8 @@ func NewClient(conf config.TelegramConfig, jid string, component *xmpp.Component
content: &conf.Content,
cache: cache.NewCache(),
options: options,
- locks: clientLocks{},
+ locks: clientLocks{
+ chatMessageLocks: make(map[int64]*sync.Mutex),
+ },
}, nil
}