* fix(tools): implement send_message routing for Matrix, Mattermost, HomeAssistant, DingTalk Matrix, Mattermost, HomeAssistant, and DingTalk were present in platform_map but fell through to the "not yet implemented" else branch, causing send_message tool calls to silently fail on these platforms. Add four async sender functions: - _send_mattermost: POST /api/v4/posts via Mattermost REST API - _send_matrix: PUT /_matrix/client/v3/rooms/.../send via Matrix CS API - _send_homeassistant: POST /api/services/notify/notify via HA REST API - _send_dingtalk: POST to session webhook URL Add routing in _send_to_platform() and 17 unit tests covering success, HTTP errors, missing config, env var fallback, and Matrix txn_id uniqueness. * fix: pass platform tokens explicitly to Mattermost/Matrix/HA senders The original PR passed pconfig.extra to sender functions, but tokens live at pconfig.token (not in extra). This caused the senders to always fall through to env var lookup instead of using the gateway-resolved token. Changes: - Mattermost/Matrix/HA: accept token as first arg, matching the Telegram/Discord/Slack sender pattern - DingTalk: add DINGTALK_WEBHOOK_URL env var fallback + docstring explaining the session-webhook vs robot-webhook difference - Tests updated for new signatures + new DingTalk env var test --------- Co-authored-by: sprmn24 <oncuevtv@gmail.com>
32 KiB
32 KiB