feat(slack): add config validation enhancements#26
Closed
Conversation
…al communication - Fix Socket Mode payload parsing: use "payload" field instead of "body" - Add proper Slack API response validation (check "ok" field) - Fix subtype filtering: allow file_share/bot_message, only skip message_changed/deleted - Fix nil pointer panic in EngineMessageHandler by checking workDirFn and taskInstrFn - Preserve original message metadata (channel_id, thread_ts) in StreamCallback for replies Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When bot is mentioned in a channel with @botName, Slack sends app_mention event instead of regular message event. Register both handlers to support both DMs and channel mentions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Slack bot now uses current working directory (HotPlex source) as workspace - Other platforms continue using /tmp/hotplex-chatapps for isolation - Add app_mention handler for @mentions in channels Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add SendAttachment method for sending files/images to Slack - Add sendFileFromURL for external URL uploads - Integrate with defaultSender to handle RichContent attachments - Support thread replies for attachments
- Add engine.work_dir config option in slack.yaml - Use "." (current directory) as default for HotPlex development - Falls back to /tmp/hotplex-chatapps if not configured This allows the Slack bot to operate on any directory specified in config, making it easy to use for HotPlex development or other projects. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add comprehensive comparison analysis between HotPlex and OpenClaw Slack implementations - Document 13 feature gaps across 6 categories (P0/P1/P2 priority) - Include 3-phase implementation roadmap (14-20 weeks estimated) - Identify technical debt risks in socket_mode.go and retry.go - Reference: Issue #21
- Add expandPath helper function to expand ~ to absolute paths - Update slack.yaml with engine.work_dir config option- Falls back to /tmp/hotplex-chatapps Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove duplicate s.handleEventsAPI call that caused double message processing - Implement ACK response for Socket Mode events (required by Slack API) - Slack expects envelope_id acknowledgment within 3 seconds Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add Reaction type to base.RichContent - Add AddReaction method to Slack adapter - Integrate reactions into defaultSender
- Add SlashCommand type - Add slash command handler at /slack endpoint - Add SetSlashCommandHandler for custom processing
- Validate bot token format (xoxb-*-*-*) - Validate app token format (xapp-*-*-*) - Validate signing secret length and format - Validate server address format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enhance Slack configuration validation with format checks for tokens and addresses.
Changes
Context
Configuration validation is important for early error detection and better developer experience. This addresses the "配置验证" gap identified in the comparison report.
Testing
Related