Fix DM event tracking and make channelType required#2
Open
Aaron Wang (tabletenniser) wants to merge 1 commit intomasterfrom
Open
Fix DM event tracking and make channelType required#2Aaron Wang (tabletenniser) wants to merge 1 commit intomasterfrom
Aaron Wang (tabletenniser) wants to merge 1 commit intomasterfrom
Conversation
The getChannelName method was changed to use channelType for DM detection but most call sites were not updated to pass it. When channelType was undefined, DMs were no longer detected and slack_channel_name was undefined instead of 'direct-message'. Changes: - Make channelType a required parameter on getChannelName, getContextSource, isConditionalReplyChannel, isNonEphemeralConditionalChannel, and isFullContentLoggingAllowed - Add slackChannelType (typed as SlackChannelType union) to MessageProcessedEvent and FeedbackEvent tracking types - Thread channelType through sendMessage, getChannelContext, and HttpEventHandler callback - Include channel_type in vote button payloads (createSafeButtonValue and sendChunkedWithVoting) so action handlers have it - Add lookupChannelType to ChannelConfigManager for app_mention events that lack channel_type in their payload (uses conversations.info) - Add channel-config.test.ts with tests for getChannelName DM detection, API lookup, lookupChannelType, and isDirectMessage - Add slack-handler.test.ts tests for vote payload channel_type preservation and prepareEventForHandling channelType passing Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
getChannelNamewas changed to usechannelTypefor DM detection but most call sites were not updated to pass it, causingslack_channel_nameto beundefinedinstead of"direct-message"for DMschannelTypea required parameter (SlackChannelTypeunion:im | mpim | channel | group) across all channel-related methods and tracking typeschannelTypethroughsendMessage,getChannelContext,HttpEventHandler, and vote button payloadslookupChannelTypetoChannelConfigManagerforapp_mentionevents that lackchannel_typein their payload (usesconversations.infoAPI)channel-config.test.tswith tests for DM detection, channel type lookup, and API error handlingslack-handler.test.tsfor vote payloadchannel_typepreservationTest plan
🤖 Generated with Claude Code