aboutsummaryrefslogtreecommitdiff
path: root/xmpp/component.go
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp/component.go')
-rw-r--r--xmpp/component.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/xmpp/component.go b/xmpp/component.go
index f5143ea..0f23d50 100644
--- a/xmpp/component.go
+++ b/xmpp/component.go
@@ -45,6 +45,13 @@ func NewComponent(conf config.XMPPConfig, tc config.TelegramConfig) (*xmpp.Strea
if err != nil {
return nil, nil, err
}
+ if gateway.Jid.Resource == "" {
+ if tc.Tdlib.Client.DeviceModel != "" {
+ gateway.Jid.Resource = tc.Tdlib.Client.DeviceModel
+ } else {
+ gateway.Jid.Resource = "telegabber"
+ }
+ }
tgConf = tc