feat: now support Telegram bot
This commit is contained in:
+3
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user