send_targets.py 481 B

123456789101112
  1. """send_message declarations for the Feishu ``PlatformEntry`` (kept out of the adapter module)."""
  2. import re
  3. from gateway.platforms.send_targets import StandaloneSendPolicy, regex_groups_parser
  4. _SEND_TARGET_RE = re.compile(r"^\s*((?:oc|ou|on|chat|open)_[-A-Za-z0-9]+)(?::([-A-Za-z0-9_]+))?\s*$")
  5. SEND_ENTRY_KWARGS = {
  6. "target_ref_syntax_fn": regex_groups_parser(_SEND_TARGET_RE),
  7. "standalone_send": StandaloneSendPolicy(label="Feishu", media=True, text_direct=True),
  8. }