aboutsummaryrefslogtreecommitdiff
path: root/telegram/commands.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2022-01-03 06:54:13 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2022-01-03 06:54:13 +0300
commitf4e4692a94b24f661d67cd4e98ac9b2ca9928c0f (patch)
treeb9c917fc783b6bdd15fa2781b607b34b3cf51606 /telegram/commands.go
parent462a537021f471579877eceb1dd6c47154d8052d (diff)
Multiple resources handling
Diffstat (limited to 'telegram/commands.go')
-rw-r--r--telegram/commands.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/telegram/commands.go b/telegram/commands.go
index 0df64c1..4b0ee13 100644
--- a/telegram/commands.go
+++ b/telegram/commands.go
@@ -155,7 +155,7 @@ func (c *Client) usernameOrIDToID(username string) (int64, error) {
// ProcessTransportCommand executes a command sent directly to the component
// and returns a response
-func (c *Client) ProcessTransportCommand(cmdline string) string {
+func (c *Client) ProcessTransportCommand(cmdline string, resource string) string {
cmd, args := parseCommand(cmdline)
switch cmd {
case "login", "code", "password":
@@ -173,7 +173,7 @@ func (c *Client) ProcessTransportCommand(cmdline string) string {
if wasSessionLoginEmpty && c.authorizer == nil {
go func() {
- err := c.Connect()
+ err := c.Connect(resource)
if err != nil {
log.Error(errors.Wrap(err, "TDlib connection failure"))
}