新增BlueBubbles适配器全套核心工具类与服务,包含会话管理、消息去重、Webhook验证、缓存系统、账号配置解析、聊天消息处理等完整功能模块,支持iMessage消息收发、群管理、反应特效、语音合成等能力,提供完善的健康检查与配置校验流程。
16 lines
467 B
Python
16 lines
467 B
Python
from __future__ import annotations
|
|
|
|
|
|
class ConversationRoute:
|
|
def __init__(self):
|
|
self._routes: dict[str, str] = {}
|
|
|
|
def register(self, conversation_id: str, adapter_key: str) -> None:
|
|
self._routes[conversation_id] = adapter_key
|
|
|
|
def resolve(self, conversation_id: str) -> str | None:
|
|
return self._routes.get(conversation_id)
|
|
|
|
def unregister(self, conversation_id: str) -> None:
|
|
self._routes.pop(conversation_id, None)
|