feat: now support Telegram bot

This commit is contained in:
JustSong
2022-12-21 18:33:00 +08:00
parent c67e639f26
commit a36d21d18e
5 changed files with 99 additions and 1 deletions
+3 -1
View File
@@ -39,6 +39,8 @@ type User struct {
BarkServer string `json:"bark_server"`
BarkSecret string `json:"bark_secret"`
ClientSecret string `json:"client_secret"`
TelegramBotToken string `json:"telegram_bot_token"`
TelegramChatId string `json:"telegram_chat_id"`
}
func GetMaxUserId() int {
@@ -75,7 +77,7 @@ func GetUserById(id int, selectAll bool) (*User, error) {
"channel", "token",
"wechat_test_account_id", "wechat_test_account_template_id", "wechat_test_account_open_id",
"wechat_corp_account_id", "wechat_corp_account_agent_id", "wechat_corp_account_user_id", "wechat_corp_account_client_type",
"corp_webhook_url", "lark_webhook_url", "ding_webhook_url", "bark_server",
"corp_webhook_url", "lark_webhook_url", "ding_webhook_url", "bark_server", "telegram_chat_id",
}).First(&user, "id = ?", id).Error
}
return &user, err