diff options
Diffstat (limited to 'telegram/client.go')
-rw-r--r-- | telegram/client.go | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/telegram/client.go b/telegram/client.go index c4c97ff..097354d 100644 --- a/telegram/client.go +++ b/telegram/client.go @@ -42,12 +42,13 @@ type Client struct { options []client.Option me *client.User - xmpp *xmpp.Component - jid string - Session *persistence.Session - content *config.TelegramContentConfig - cache *cache.Cache - online bool + xmpp *xmpp.Component + jid string + Session *persistence.Session + resources map[string]bool + content *config.TelegramContentConfig + cache *cache.Cache + online bool locks clientLocks } @@ -55,6 +56,7 @@ type Client struct { type clientLocks struct { authorizationReady sync.WaitGroup chatMessageLocks map[int64]*sync.Mutex + resourcesLock sync.Mutex } // NewClient instantiates a Telegram App @@ -104,6 +106,7 @@ func NewClient(conf config.TelegramConfig, jid string, component *xmpp.Component xmpp: component, jid: jid, Session: session, + resources: make(map[string]bool), content: &conf.Content, cache: cache.NewCache(), options: options, |