1

Fail if Telegram API ID or API Hash empty

This commit is contained in:
Vladimir Hodakov 2019-03-02 19:32:48 +04:00
parent 4576c6d439
commit 4d3eb3ea7f
Signed by: Vladimir Hodakov
GPG Key ID: 673980B6882F82C6

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)