mirror of
https://github.com/42wim/matterbridge.git
synced 2024-11-21 10:12:00 -08:00
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 {
|
func (b *Brocketchat) apiLogin() error {
|
||||||
b.Log.Debugf("handling apiLogin()")
|
b.Log.Debugf("handling apiLogin()")
|
||||||
credentials := &models.UserCredentials{Email: b.GetString("login"), Password: b.GetString("password")}
|
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"))
|
myURL, err := url.Parse(b.GetString("server"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -956,6 +956,11 @@ Server="https://yourrocketchatserver.domain.com:443"
|
|||||||
#REQUIRED (when not using webhooks)
|
#REQUIRED (when not using webhooks)
|
||||||
Login="yourlogin@domain.com"
|
Login="yourlogin@domain.com"
|
||||||
Password="yourpass"
|
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.
|
#### Settings for webhook matterbridge.
|
||||||
#USE DEDICATED BOT USER WHEN POSSIBLE! This allows you to use advanced features like message editing/deleting and uploads
|
#USE DEDICATED BOT USER WHEN POSSIBLE! This allows you to use advanced features like message editing/deleting and uploads
|
||||||
|
Loading…
Reference in New Issue
Block a user