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:
EkkoG
2026-03-07 23:21:07 +08:00
parent 1bddf3daa7
commit 65c18b1d52
8 changed files with 900 additions and 1 deletions
+11
View File
@@ -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
)
}
+1 -1
View File
@@ -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)
+1
View File
@@ -287,6 +287,7 @@ class MessageChannel(Enum):
VoceChat = "VoceChat"
Web = "Web"
WebPush = "WebPush"
QQ = "QQ"
# 下载器类型