2
This commit is contained in:
@@ -3739,7 +3739,7 @@ class ProvisionerBot:
|
|||||||
)
|
)
|
||||||
|
|
||||||
# 测试 API 连接
|
# 测试 API 连接
|
||||||
await self._test_mail_api_connection(update.effective_chat.id, progress_msg.message_id, new_token, config)
|
await self._test_mail_api_connection_with_edit(update.effective_chat.id, progress_msg.message_id, new_token, config)
|
||||||
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
await update.message.reply_text(
|
await update.message.reply_text(
|
||||||
@@ -3749,8 +3749,8 @@ class ProvisionerBot:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
await update.message.reply_text(f"❌ 更新 Token 失败: {e}")
|
await update.message.reply_text(f"❌ 更新 Token 失败: {e}")
|
||||||
|
|
||||||
async def _test_mail_api_connection(self, chat_id: int, message_id: int, token: str, config: dict):
|
async def _test_mail_api_connection_with_edit(self, chat_id: int, message_id: int, token: str, config: dict):
|
||||||
"""测试邮件 API 连接"""
|
"""测试邮件 API 连接 (带消息编辑)"""
|
||||||
import requests
|
import requests
|
||||||
|
|
||||||
mail_api_base = config.get("autogptplus", {}).get("mail_api_base", "")
|
mail_api_base = config.get("autogptplus", {}).get("mail_api_base", "")
|
||||||
|
|||||||
Reference in New Issue
Block a user