Browse Source

Fail if Telegram API ID or API Hash empty

master
Vladimir Hodakov 1 year ago
parent
commit
4d3eb3ea7f
Signed by: fat0troll GPG Key ID: 673980B6882F82C6
1 changed files with 8 additions and 0 deletions
  1. + 8
    - 0
      internal/telegram/telegram.go

+ 8
- 0
internal/telegram/telegram.go

@ -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)

Loading…
Cancel
Save