diff options
| author | mhsanaei <ho3ein.sanaei@gmail.com> | 2024-07-03 22:53:45 +0300 |
|---|---|---|
| committer | mhsanaei <ho3ein.sanaei@gmail.com> | 2024-07-03 22:53:45 +0300 |
| commit | 21b64beb96264dfbee8b3c855effe87f7aeb5d12 (patch) | |
| tree | 9dae50105293e1dd0d339795ee6cca23a5ac5dc2 /web/service | |
| parent | b84e3ef33812e829078a8661da57f020438bcf6b (diff) | |
tgbot - login notify (show password for failed login)
Diffstat (limited to 'web/service')
| -rw-r--r-- | web/service/tgbot.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/web/service/tgbot.go b/web/service/tgbot.go index 0880faaa..c1fd79fe 100644 --- a/web/service/tgbot.go +++ b/web/service/tgbot.go @@ -1019,7 +1019,7 @@ func (t *Tgbot) prepareServerUsageInfo() string { return info } -func (t *Tgbot) UserLoginNotify(username string, ip string, time string, status LoginStatus) { +func (t *Tgbot) UserLoginNotify(username string, password string, ip string, time string, status LoginStatus) { if !t.IsRunning() { return } @@ -1037,11 +1037,12 @@ func (t *Tgbot) UserLoginNotify(username string, ip string, time string, status msg := "" if status == LoginSuccess { msg += t.I18nBot("tgbot.messages.loginSuccess") + msg += t.I18nBot("tgbot.messages.hostname", "Hostname=="+hostname) } else if status == LoginFail { msg += t.I18nBot("tgbot.messages.loginFailed") + msg += t.I18nBot("tgbot.messages.hostname", "Hostname=="+hostname) + msg += t.I18nBot("tgbot.messages.password", "Password=="+password) } - - msg += t.I18nBot("tgbot.messages.hostname", "Hostname=="+hostname) msg += t.I18nBot("tgbot.messages.username", "Username=="+username) msg += t.I18nBot("tgbot.messages.ip", "IP=="+ip) msg += t.I18nBot("tgbot.messages.time", "Time=="+time) |
