new - tg Login Notification #584

This commit is contained in:
MHSanaei
2023-06-17 19:11:16 +03:30
parent 5188d516e3
commit b833ed7992
9 changed files with 21 additions and 0 deletions

View File

@@ -643,6 +643,11 @@ func (t *Tgbot) UserLoginNotify(username string, ip string, time string, status
return
}
loginNotifyEnabled, err := t.settingService.GetTgBotLoginNotify()
if err != nil || !loginNotifyEnabled {
return
}
msg := ""
if status == LoginSuccess {
msg += t.I18nBot("tgbot.messages.loginSuccess")