Skip to content

feat(slack): include Slack user mention in post notifications - #194

Draft
cleptric wants to merge 1 commit into
mainfrom
feat/slack-user-mention
Draft

feat(slack): include Slack user mention in post notifications#194
cleptric wants to merge 1 commit into
mainfrom
feat/slack-user-mention

Conversation

@cleptric

Copy link
Copy Markdown
Member

What

Adds a slackUserId field to the User model so that Slack post notifications include a proper <@USERID> mention instead of a plain display name. This makes the mention clickable in Slack and notifies the author.

Changes

  • app/db/schema.ts — nullable slackUserId text column on User
  • app/models/user.server.ts — exposes slackUserId in PUBLIC_USER_COLUMNS and updateUser()
  • app/models/post.server.ts — adds slackUserId to PostAuthor type
  • app/lib/slack.tsnotify() uses <@slackUserId> when set, falls back to getDisplayName()
  • app/routes/u.$userEmail._index.tsx — admin user profile page gets a "Slack User ID" input
  • drizzle/0001_add_user_slack_user_id.sql — migration: ALTER TABLE "User" ADD COLUMN "slackUserId" text

How to set a user's Slack ID

Admins can set it via the user profile page (/u/<email>) → Admin panel → Slack User ID field. The ID format is e.g. U03SQM83ML2.


View Session in Sentry

Add a slackUserId field to the User model so post notification messages
sent to Slack channels use `<@userid>` instead of a plain display name.
This lets Slack resolve the mention to a live profile and notify the author.

- Add nullable `slackUserId` column to the User table
- Expose it in PUBLIC_USER_COLUMNS and PostAuthor type
- notify() in slack.ts prefers `<@slackUserId>` over getDisplayName()
- Admin user profile page gains a Slack User ID input field
- Drizzle migration 0001_add_user_slack_user_id.sql

Co-Authored-By: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vanguard Ready Ready Preview, Comment Jun 16, 2026 9:07pm

Request Review

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.

1 participant