Skip to content

feat: add slack_users table to cache user ID to real name mapping#104

Open
jee7s wants to merge 1 commit into
mainfrom
feat/slack-user-table
Open

feat: add slack_users table to cache user ID to real name mapping#104
jee7s wants to merge 1 commit into
mainfrom
feat/slack-user-table

Conversation

@jee7s

@jee7s jee7s commented Apr 14, 2026

Copy link
Copy Markdown
Collaborator

Adds a slack_users table with user_id (PK), real_name, display_name, and updated_at. On each event processed, the agent looks up the user's Slack profile and upserts their name into the table in the background (non-blocking, non-critical). This lets the audit log be correlated to real names without storing names in the audit_log table itself.

Changes:

  • db: new slackUsers table in Postgres and SQLite schemas
  • db: UserStore interface and PostgresUserStore / SqliteUserStore impls
  • db: migration 0001_slack_users.sql
  • agent/slack: lookupSlackUser() fetches profile via users.info API
  • agent/index: upsert user on every processEvent (fire-and-forget)

Adds a slack_users table with user_id (PK), real_name, display_name,
and updated_at. On each event processed, the agent looks up the user's
Slack profile and upserts their name into the table in the background
(non-blocking, non-critical). This lets the audit log be correlated to
real names without storing names in the audit_log table itself.

Changes:
- db: new slackUsers table in Postgres and SQLite schemas
- db: UserStore interface and PostgresUserStore / SqliteUserStore impls
- db: migration 0001_slack_users.sql
- agent/slack: lookupSlackUser() fetches profile via users.info API
- agent/index: upsert user on every processEvent (fire-and-forget)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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