Add token support (RocketChat) (#892)
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
This commit is contained in:
parent
28783a4146
commit
9b320cd43f
|
@ -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
|
||||
|
|
|
@ -956,6 +956,11 @@ Server="https://yourrocketchatserver.domain.com:443"
|
|||
#REQUIRED (when not using webhooks)
|
||||
Login="yourlogin@domain.com"
|
||||
Password="yourpass"
|
||||
# When using access token set Login to the User ID associated with your token and Token to your token.
|
||||
# When Token is set Password is ignored.
|
||||
# Login="yOurUSerID"
|
||||
# Token="YoUrUsER_toKEN"
|
||||
|
||||
|
||||
#### Settings for webhook matterbridge.
|
||||
#USE DEDICATED BOT USER WHEN POSSIBLE! This allows you to use advanced features like message editing/deleting and uploads
|
||||
|
|
Loading…
Reference in New Issue