From 7f360707b769bffe7978af940cc726e3a62dc543 Mon Sep 17 00:00:00 2001 From: Colsrch Date: Mon, 17 Oct 2022 10:10:30 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=97=A0=E6=B3=95=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E7=89=88=E6=9C=AC=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/core/config.exp.yaml | 8 ++++---- app/core/config.py | 3 +-- app/util/version.json | 6 +++++- app/util/version.py | 4 +++- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/app/core/config.exp.yaml b/app/core/config.exp.yaml index 0696fe8..2b6e47e 100644 --- a/app/core/config.exp.yaml +++ b/app/core/config.exp.yaml @@ -1,5 +1,5 @@ # Madoka 配置文件 -# 请将该文件复制为 config.yaml 并填充该文件 +# 请将该文件复制至 app/data/config.yaml 并填充该文件 name: Madoka # 机器人名字 master_qq: # 机器人主人 QQ @@ -44,6 +44,6 @@ message_queue: event: # 群撤回消息监控 - # True: 转发至 master - # False: 回送至原群 - groupRecall2me: true + # true: 转发至 master + # false: 回送至原群 + groupRecall2me: false diff --git a/app/core/config.py b/app/core/config.py index be04059..3eb6651 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -13,7 +13,7 @@ class MadokaInfo: NAME = "Madoka" - VERSION = "4.0.2" + VERSION = "4.0.3" DOCS = "https://madoka.colsrch.cn" REPO = "https://github.com/MadokaProject/Madoka" REMOTE_REPO_VERSION = "v4" @@ -24,7 +24,6 @@ class _Bot(BaseSettings, extra=Extra.ignore): account: int verify_key: str host: AnyHttpUrl = "http://127.0.0.1:8080" - heartbeat_log: bool = False class _Database(BaseSettings, extra=Extra.ignore): diff --git a/app/util/version.json b/app/util/version.json index 9af8873..9c29b62 100644 --- a/app/util/version.json +++ b/app/util/version.json @@ -1,6 +1,10 @@ { - "version": "4.0.2", + "version": "4.0.3", "update_log": [ + { + "version": "4.0.3", + "info": "修复无法获取远程版本信息的问题,修复已知问题" + }, { "version": "4.0.2", "info": "调整获取远程版本的url, 导出requirements.txt" diff --git a/app/util/version.py b/app/util/version.py index 005685e..a86beda 100644 --- a/app/util/version.py +++ b/app/util/version.py @@ -1,3 +1,5 @@ +import json + import aiohttp.client from loguru import logger @@ -30,7 +32,7 @@ def compare_version(remote_version: str, native_version: str) -> bool: async def check_version(): """检查版本信息""" try: - remote_info = await general_request(MadokaInfo.REMOTE_VERSION_URL, method="get", _type="json") + remote_info = json.loads(await general_request(MadokaInfo.REMOTE_VERSION_URL, method="get", _type="text")) remote_version = remote_info["version"] remote_update_logs = remote_info["update_log"] logger.info(f"Remote Version: {remote_version}")