fix 消息交互 again

This commit is contained in:
jxxghp
2024-10-18 18:30:34 +08:00
parent e93b3f5602
commit 2b982ce7a8
6 changed files with 7 additions and 1 deletions

View File

@@ -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:

View File

@@ -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:

View File

@@ -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:

View File

@@ -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:

View File

@@ -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:

View File

@@ -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: