Accounts: Fix cog on telegram when no discord linked

Also, disable telegram & discord if an auth/initialization error occurs.
This commit is contained in:
Harvey Tindall
2021-05-23 14:48:36 +01:00
parent 519a5615cc
commit b8e3fc636c
3 changed files with 14 additions and 11 deletions
+2
View File
@@ -570,6 +570,7 @@ func start(asDaemon, firstCall bool) {
app.telegram, err = newTelegramDaemon(app)
if err != nil {
app.err.Printf("Failed to authenticate with Telegram: %v", err)
telegramEnabled = false
} else {
go app.telegram.run()
defer app.telegram.Shutdown()
@@ -579,6 +580,7 @@ func start(asDaemon, firstCall bool) {
app.discord, err = newDiscordDaemon(app)
if err != nil {
app.err.Printf("Failed to authenticate with Discord: %v", err)
discordEnabled = false
} else {
go app.discord.run()
defer app.discord.Shutdown()