diff --git a/package.json b/package.json index 79101c4..da7fda8 100644 --- a/package.json +++ b/package.json @@ -491,11 +491,14 @@ "name": "Bark消息推送", "description": "支持使用Bark发送消息通知。", "labels": "消息通知", - "version": "1.1", + "version": "1.2", "icon": "Bark_A.png", "author": "jxxghp", "level": 1, - "v2": true + "v2": true, + "history": { + "v1.2": "支持多人消息发送" + } }, "PushDeerMsg": { "name": "PushDeer消息推送", diff --git a/plugins/barkmsg/__init__.py b/plugins/barkmsg/__init__.py index 9b610f0..58f7df8 100644 --- a/plugins/barkmsg/__init__.py +++ b/plugins/barkmsg/__init__.py @@ -16,7 +16,7 @@ class BarkMsg(_PluginBase): # 插件图标 plugin_icon = "Bark_A.png" # 插件版本 - plugin_version = "1.1" + plugin_version = "1.2" # 插件作者 plugin_author = "jxxghp" # 作者主页 @@ -139,7 +139,7 @@ class BarkMsg(_PluginBase): 'props': { 'model': 'apikey', 'label': '密钥', - 'placeholder': '', + 'placeholder': '每行一个用户密钥', } } ] @@ -217,7 +217,7 @@ class BarkMsg(_PluginBase): try: if not self._server or not self._apikey: return False, "参数未配置" - for apikey in self._apikey.split() + for apikey in self._apikey.split(): sc_url = "%s/%s/%s/%s" % (self._server, apikey, quote_plus(title), quote_plus(text)) if self._params: sc_url = "%s?%s" % (sc_url, self._params) @@ -227,13 +227,13 @@ class BarkMsg(_PluginBase): code = ret_json['code'] message = ret_json['message'] if code == 200: - logger.info("Bark消息发送成功") + logger.info(f"{apikey} Bark消息发送成功") else: - logger.warn(f"Bark消息发送失败:{message}") + logger.warn(f"{apikey} Bark消息发送失败:{message}") elif res is not None: - logger.warn(f"Bark消息发送失败,错误码:{res.status_code},错误原因:{res.reason}") + logger.warn(f"{apikey} Bark消息发送失败,错误码:{res.status_code},错误原因:{res.reason}") else: - logger.warn(f"Bark消息发送失败:未获取到返回信息") + logger.warn(f"{apikey} Bark消息发送失败:未获取到返回信息") except Exception as msg_e: logger.error(f"Bark消息发送失败:{str(msg_e)}")