5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-09 23:40:27 +00:00

Make slack-legacy change less restrictive (#626)

This commit is contained in:
Wim 2018-12-02 23:09:21 +01:00 committed by GitHub
parent e538a4d304
commit 859ebad55d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,14 +77,9 @@ func New(cfg *bridge.Config) bridge.Bridger {
// Print a deprecation warning for legacy non-bot tokens (#527). // Print a deprecation warning for legacy non-bot tokens (#527).
token := cfg.GetString(tokenConfig) token := cfg.GetString(tokenConfig)
if token != "" && !strings.HasPrefix(token, "xoxb") { if token != "" && !strings.HasPrefix(token, "xoxb") {
cfg.Log.Error("Non-bot token detected. It is STRONGLY recommended to use a proper bot-token instead.") cfg.Log.Warn("Non-bot token detected. It is STRONGLY recommended to use a proper bot-token instead.")
cfg.Log.Error("Legacy tokens may be deprecated by Slack at short notice. See the Matterbridge GitHub wiki for a migration guide.") cfg.Log.Warn("Legacy tokens may be deprecated by Slack at short notice. See the Matterbridge GitHub wiki for a migration guide.")
cfg.Log.Error("See https://github.com/42wim/matterbridge/wiki/Slack-bot-setup") cfg.Log.Warn("See https://github.com/42wim/matterbridge/wiki/Slack-bot-setup")
cfg.Log.Error("")
cfg.Log.Error("To continue using a legacy token please move your configuration to a \"slack-legacy\" bridge instead.")
cfg.Log.Error("See https://github.com/42wim/matterbridge/wiki/Section-Slack-(basic)#legacy-configuration)")
cfg.Log.Error("Delaying start of bridge by 30 seconds. Future Matterbridge release will fail here unless you use a \"slack-legacy\" bridge.")
time.Sleep(30 * time.Second)
return NewLegacy(cfg) return NewLegacy(cfg)
} }
return newBridge(cfg) return newBridge(cfg)