Skip to content

fix(groups): resolve internal user before listing - #240

Merged
ralyodio merged 1 commit into
profullstack:masterfrom
rissrice2105-agent:fix/group-list-internal-user-id
Aug 12, 2026
Merged

fix(groups): resolve internal user before listing#240
ralyodio merged 1 commit into
profullstack:masterfrom
rissrice2105-agent:fix/group-list-internal-user-id

Conversation

@rissrice2105-agent

Copy link
Copy Markdown
Contributor

Summary

  • resolve the authenticated Supabase user to the app's internal users.id
  • pass that internal UUID to get_user_groups
  • return 404 without calling the RPC when the internal profile is missing

Bug

get_user_groups filters group_members.user_id, which references users.id, but the route passed auth.users.id. Those UUIDs differ, so authenticated users could receive an empty group list.

Tests

  • pnpm exec vitest run src/app/api/chat/groups/route.test.js
  • pnpm exec eslint src/app/api/chat/groups/route.js src/app/api/chat/groups/route.test.js
  • pnpm test:ci (81 files, 482 tests)

Formatting could not run because the repository's Prettier config references the undeclared prettier-plugin-svelte; the touched files follow the existing style and git diff --check passes.

@ralyodio
ralyodio merged commit af12eb9 into profullstack:master Aug 12, 2026
10 checks passed
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