diff options
Diffstat (limited to 'bridge/rocketchat')
-rw-r--r-- | bridge/rocketchat/helpers.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bridge/rocketchat/helpers.go b/bridge/rocketchat/helpers.go index 9fca4a6d..936f631c 100644 --- a/bridge/rocketchat/helpers.go +++ b/bridge/rocketchat/helpers.go @@ -58,6 +58,9 @@ func (b *Brocketchat) doConnectWebhookURL() error { func (b *Brocketchat) apiLogin() error { b.Log.Debugf("handling apiLogin()") credentials := &models.UserCredentials{Email: b.GetString("login"), Password: b.GetString("password")} + if b.GetString("Token") != "" { + credentials = &models.UserCredentials{ID: b.GetString("Login"), Token: b.GetString("Token")} + } myURL, err := url.Parse(b.GetString("server")) if err != nil { return err |