新增会话注册
This commit is contained in:
@@ -1006,7 +1006,7 @@ class WPSAPI(BasicWPSInterface):
|
||||
|
||||
@override
|
||||
def get_webhook_url(self, message: str, chat_id: int, user_id: int) -> str:
|
||||
webhook_url = ProjectConfig().GetFile(f"webhook_url/{chat_id}",False).LoadAsText()
|
||||
webhook_url = ProjectConfig().GetFile(f"webhook_url/{chat_id}",True).LoadAsText()
|
||||
if webhook_url == "":
|
||||
webhook_url = MAIN_WEBHOOK_URL
|
||||
return webhook_url
|
||||
@@ -1069,7 +1069,7 @@ class WPSAPIWebhook(WPSAPI):
|
||||
|
||||
@override
|
||||
async def callback(self, message: str, chat_id: int, user_id: int) -> str|None:
|
||||
ProjectConfig().GetFile(f"webhook_url/{chat_id}",False).SaveAsText(message)
|
||||
ProjectConfig().GetFile(f"webhook_url/{chat_id}",True).SaveAsText(message)
|
||||
return await self.send_markdown_message(f"会话注册成功", chat_id, user_id)
|
||||
|
||||
logger.SaveProperties()
|
||||
Reference in New Issue
Block a user