Skip to content

Comments

fix(slack): Slack channel fixes, DM filtering, emoji sanitization, and restore TLS on websocket#148

Open
sra wants to merge 5 commits intospacedriveapp:mainfrom
sra:fix/slack-channel-fixes
Open

fix(slack): Slack channel fixes, DM filtering, emoji sanitization, and restore TLS on websocket#148
sra wants to merge 5 commits intospacedriveapp:mainfrom
sra:fix/slack-channel-fixes

Conversation

@sra
Copy link

@sra sra commented Feb 22, 2026

…d TLS

Fixes several Slack adapter issues and restores the build after #117.

Build fixes:

Slack DM filtering:

  • DMs now bypass workspace/channel filters when sender is in dm_allowed_users
  • dm_allowed_users is merged from both SlackConfig and per-binding configs
  • Added debug logging for DM permission decisions

Emoji reactions:

  • Sanitize Slack emoji reactions to use shortcodes via the emojis crate
  • Handle edge case where emoji has no shortcode (falls back to name)
  • Strip colons, normalize whitespace and casing

TLS connectivity:

  • Add tokio-tungstenite with rustls-tls-native-roots feature to fix wss:// connections that broke after the tungstenite 0.28 TLS feature restructure

Logging:

  • Downgrade per-message Slack log from info to debug, matching Discord, Telegram, and Twitch adapters which only use info for lifecycle events

Style:

  • Rename abbreviated uid to sender_id per style guide
  • Remove section-divider comments and extra blank lines in imports

Tests:

  • 9 unit tests for sanitize_reaction_name (unicode, shortcodes, fallbacks)
  • 7 unit tests for SlackPermissions::from_config (merging, dedup, filtering)

…d TLS

Fixes several Slack adapter issues and restores the build after spacedriveapp#117.

Build fixes:
- Restore compile after security middleware changes (Axum State extractor
  pattern in api_auth_middleware, url::Url → reqwest::Url in browser tool)
(this is from unmerged pr spacedriveapp#125)

Slack DM filtering:
- DMs now bypass workspace/channel filters when sender is in dm_allowed_users
- dm_allowed_users is merged from both SlackConfig and per-binding configs
- Added debug logging for DM permission decisions

Emoji reactions:
- Sanitize Slack emoji reactions to use shortcodes via the `emojis` crate
- Handle edge case where emoji has no shortcode (falls back to name)
- Strip colons, normalize whitespace and casing

TLS connectivity:
- Add tokio-tungstenite with rustls-tls-native-roots feature to fix wss://
  connections that broke after the tungstenite 0.28 TLS feature restructure

Logging:
- Downgrade per-message Slack log from info to debug, matching Discord,
  Telegram, and Twitch adapters which only use info for lifecycle events

Style:
- Rename abbreviated `uid` to `sender_id` per style guide
- Remove section-divider comments and extra blank lines in imports

Tests:
- 9 unit tests for sanitize_reaction_name (unicode, shortcodes, fallbacks)
- 7 unit tests for SlackPermissions::from_config (merging, dedup, filtering)
jamiepine
jamiepine previously approved these changes Feb 22, 2026
Copy link
Member

@jamiepine jamiepine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@sra sra requested a review from jamiepine February 22, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants