aboutsummaryrefslogtreecommitdiff
path: root/xmpp/component.go
diff options
context:
space:
mode:
authorbodqhrohro <bodqhrohro@gmail.com>2019-11-08 00:09:53 +0300
committerbodqhrohro <bodqhrohro@gmail.com>2019-11-08 00:09:53 +0300
commit7185d4ac9b039bbb74291f57ee2dae6120c636f6 (patch)
treed6c8acc0e02b174c14cfb67068607da3e4b19a50 /xmpp/component.go
parent29da6ac0a08ab955441dcfa83ec1afac2e56efed (diff)
Fix presence handling and lockup on TDlib instance creation
Diffstat (limited to 'xmpp/component.go')
-rw-r--r--xmpp/component.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/xmpp/component.go b/xmpp/component.go
index 1562224..036bc3c 100644
--- a/xmpp/component.go
+++ b/xmpp/component.go
@@ -2,12 +2,14 @@ package xmpp
import (
"dev.narayana.im/narayana/telegabber/config"
+ "dev.narayana.im/narayana/telegabber/telegram"
"gosrc.io/xmpp"
)
var jid *xmpp.Jid
var tgConf config.TelegramConfig
+var sessions map[string]telegram.Client
// NewComponent starts a new component and wraps it in
// a stream manager that you should start yourself
@@ -19,6 +21,7 @@ func NewComponent(conf config.XMPPConfig, tc config.TelegramConfig) (*xmpp.Strea
}
tgConf = tc
+ sessions = make(map[string]telegram.Client)
options := xmpp.ComponentOptions{
Address: conf.Host + ":" + conf.Port,