mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-06 16:07:01 +08:00
feat(qqbot): implement QQ Bot notification module with API and WebSocket support
- Added QQ Bot notification module to facilitate proactive message sending and message reception via Gateway. - Implemented API functions for sending C2C and group messages. - Established WebSocket client for real-time message handling. - Updated requirements to include websocket-client dependency. - Enhanced schemas to support QQ channel capabilities and notification configurations.
This commit is contained in:
@@ -114,6 +114,8 @@ class NotificationSwitch(BaseModel):
|
||||
vocechat: Optional[bool] = False
|
||||
# WebPush开关
|
||||
webpush: Optional[bool] = False
|
||||
# QQ开关
|
||||
qq: Optional[bool] = False
|
||||
|
||||
|
||||
class Subscription(BaseModel):
|
||||
@@ -270,6 +272,15 @@ class ChannelCapabilityManager:
|
||||
ChannelCapability.LINKS
|
||||
},
|
||||
fallback_enabled=True
|
||||
),
|
||||
MessageChannel.QQ: ChannelCapabilities(
|
||||
channel=MessageChannel.QQ,
|
||||
capabilities={
|
||||
ChannelCapability.RICH_TEXT,
|
||||
ChannelCapability.IMAGES,
|
||||
ChannelCapability.LINKS
|
||||
},
|
||||
fallback_enabled=True
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ class NotificationConf(BaseModel):
|
||||
|
||||
# 名称
|
||||
name: Optional[str] = None
|
||||
# 类型 telegram/wechat/vocechat/synologychat/slack/webpush
|
||||
# 类型 telegram/wechat/vocechat/synologychat/slack/webpush/qqbot
|
||||
type: Optional[str] = None
|
||||
# 配置
|
||||
config: Optional[dict] = Field(default_factory=dict)
|
||||
|
||||
@@ -287,6 +287,7 @@ class MessageChannel(Enum):
|
||||
VoceChat = "VoceChat"
|
||||
Web = "Web"
|
||||
WebPush = "WebPush"
|
||||
QQ = "QQ"
|
||||
|
||||
|
||||
# 下载器类型
|
||||
|
||||
Reference in New Issue
Block a user