1
Fork 0

Fail if Telegram API ID or API Hash empty

master
Vladimir Hodakov 2019-03-02 19:32:48 +04:00
parent 4576c6d439
commit 4d3eb3ea7f
Signed by: Vladimir Hodakov
GPG Key ID: 673980B6882F82C6
1 changed files with 8 additions and 0 deletions

View File

@ -14,6 +14,14 @@ import (
// At first launch we need to login manually - there is no way to automate
// Telegram login
func Authenticate() {
if c.Config.TDLib.APIHash == "" {
log.Error().Msg("APIHash is empty")
return
}
if c.Config.TDLib.APIID == "" {
log.Error().Msg("APIID is empty")
return
}
tdlib.SetLogVerbosityLevel(1)
tdlib.SetFilePath(c.Config.TDLib.ErrorsFile)