diff --git a/app/modules/slack/__init__.py b/app/modules/slack/__init__.py index b5245688..51e1a3b9 100644 --- a/app/modules/slack/__init__.py +++ b/app/modules/slack/__init__.py @@ -18,6 +18,7 @@ class SlackModule(_ModuleBase, _MessageBase[Slack]): """ super().init_service(service_name=Slack.__name__.lower(), service_type=Slack) + self._channel = MessageChannel.Slack @staticmethod def get_name() -> str: diff --git a/app/modules/synologychat/__init__.py b/app/modules/synologychat/__init__.py index dde90492..5199d882 100644 --- a/app/modules/synologychat/__init__.py +++ b/app/modules/synologychat/__init__.py @@ -16,6 +16,7 @@ class SynologyChatModule(_ModuleBase, _MessageBase[SynologyChat]): """ super().init_service(service_name=SynologyChat.__name__.lower(), service_type=SynologyChat) + self._channel = MessageChannel.SynologyChat @staticmethod def get_name() -> str: diff --git a/app/modules/telegram/__init__.py b/app/modules/telegram/__init__.py index bd60b32a..af96d86c 100644 --- a/app/modules/telegram/__init__.py +++ b/app/modules/telegram/__init__.py @@ -17,6 +17,7 @@ class TelegramModule(_ModuleBase, _MessageBase[Telegram]): """ super().init_service(service_name=Telegram.__name__.lower(), service_type=Telegram) + self._channel = MessageChannel.Telegram @staticmethod def get_name() -> str: diff --git a/app/modules/vocechat/__init__.py b/app/modules/vocechat/__init__.py index d4376283..4b77333c 100644 --- a/app/modules/vocechat/__init__.py +++ b/app/modules/vocechat/__init__.py @@ -17,6 +17,7 @@ class VoceChatModule(_ModuleBase, _MessageBase[VoceChat]): """ super().init_service(service_name=VoceChat.__name__.lower(), service_type=VoceChat) + self._channel = MessageChannel.VoceChat @staticmethod def get_name() -> str: diff --git a/app/modules/webpush/__init__.py b/app/modules/webpush/__init__.py index 70030614..4f53e75b 100644 --- a/app/modules/webpush/__init__.py +++ b/app/modules/webpush/__init__.py @@ -7,7 +7,7 @@ from app.core.config import global_vars, settings from app.log import logger from app.modules import _ModuleBase, _MessageBase from app.schemas import Notification -from app.schemas.types import ModuleType +from app.schemas.types import ModuleType, MessageChannel class WebPushModule(_ModuleBase, _MessageBase): @@ -17,6 +17,7 @@ class WebPushModule(_ModuleBase, _MessageBase): 初始化模块 """ super().init_service(service_name=self.get_name().lower()) + self._channel = MessageChannel.WebPush @staticmethod def get_name() -> str: diff --git a/app/modules/wechat/__init__.py b/app/modules/wechat/__init__.py index 5d1026d2..b31fba56 100644 --- a/app/modules/wechat/__init__.py +++ b/app/modules/wechat/__init__.py @@ -19,6 +19,7 @@ class WechatModule(_ModuleBase, _MessageBase[WeChat]): """ super().init_service(service_name=WeChat.__name__.lower(), service_type=WeChat) + self._channel = MessageChannel.Wechat @staticmethod def get_name() -> str: