fix cf优选插件发送消息
This commit is contained in:
@ -11,7 +11,7 @@ from python_hosts import Hosts, HostsEntry
|
|||||||
from app.core.config import settings
|
from app.core.config import settings
|
||||||
from app.log import logger
|
from app.log import logger
|
||||||
from app.plugins import _PluginBase
|
from app.plugins import _PluginBase
|
||||||
from app.schemas.types import EventType
|
from app.schemas.types import EventType, NotificationType
|
||||||
from app.utils.http import RequestUtils
|
from app.utils.http import RequestUtils
|
||||||
from app.utils.ip import IpUtils
|
from app.utils.ip import IpUtils
|
||||||
from app.utils.system import SystemUtils
|
from app.utils.system import SystemUtils
|
||||||
@ -192,7 +192,8 @@ class CloudflareSpeedTest(_PluginBase):
|
|||||||
"plugin_id": "CustomHosts"
|
"plugin_id": "CustomHosts"
|
||||||
})
|
})
|
||||||
if self._notify:
|
if self._notify:
|
||||||
logger.send_message(
|
self.post_message(
|
||||||
|
mtype=NotificationType.SiteMessage,
|
||||||
title="【Cloudflare优选任务完成】",
|
title="【Cloudflare优选任务完成】",
|
||||||
text=f"原ip:{old_ip}\n"
|
text=f"原ip:{old_ip}\n"
|
||||||
f"新ip:{best_ip}"
|
f"新ip:{best_ip}"
|
||||||
|
Reference in New Issue
Block a user