mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-19 08:35:29 +00:00
Add interactive message buttons and emoji reactions to the Mattermost extension, enabling agents to send messages with clickable action buttons and react to posts with emoji. Interactive buttons: - HMAC-SHA256 token verification for secure button callbacks - HTTP callback handler registered via registerPluginHttpRoute - Button click completion: replaces buttons with confirmation text - Localhost-only validation for callback requests - Stable HMAC secret derived from bot token (works across CLI/gateway) Reactions: - Add/remove emoji reactions via Mattermost REST API - Bot user ID caching with TTL for reaction requests - Reaction event handling in WebSocket monitor with DM/group policy enforcement Channel actions adapter: - supportsButtons, handleAction, listActions for the ChannelPlugin interface - Send action with optional button attachments - React action with add/remove support and emoji colon stripping Also includes: - updateMattermostPost for modifying existing posts (button completion) - props passthrough in createMattermostPost for attachments - parseMattermostTarget with channel-name and isMattermostId support - Comprehensive test coverage (58 new tests across 4 test files)