diff options
Diffstat (limited to 'telegram')
-rw-r--r-- | telegram/client.go | 7 | ||||
-rw-r--r-- | telegram/utils.go | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/telegram/client.go b/telegram/client.go index 5220c2d..9a98be7 100644 --- a/telegram/client.go +++ b/telegram/client.go @@ -48,6 +48,7 @@ type Client struct { options []client.Option me *client.User + resource string xmpp *xmpp.Component jid string Session *persistence.Session @@ -115,8 +116,14 @@ func NewClient(conf config.TelegramConfig, jid string, component *xmpp.Component IgnoreFileNames: false, } + resource := conf.Tdlib.Client.DeviceModel + if resource == "" { + resource = "telegabber" + } + return &Client{ parameters: ¶meters, + resource: resource, xmpp: component, jid: jid, Session: session, diff --git a/telegram/utils.go b/telegram/utils.go index e2fbe3b..a0e8147 100644 --- a/telegram/utils.go +++ b/telegram/utils.go @@ -217,6 +217,7 @@ func (c *Client) ProcessStatusUpdate(chatID int64, status string, show string, o gateway.SPShow(show), gateway.SPStatus(status), gateway.SPPhoto(photo), + gateway.SPResource(c.resource), gateway.SPImmed(gateway.SPImmed.Get(oldArgs)), } if presenceType != "" { |