diff --git a/src/components/inbox/template-picker.tsx b/src/components/inbox/template-picker.tsx index f3607c1..9a0b754 100644 --- a/src/components/inbox/template-picker.tsx +++ b/src/components/inbox/template-picker.tsx @@ -104,10 +104,13 @@ export function TemplatePicker({ return; } + // Scope by RLS (message_templates_select → is_account_member), NOT by + // user_id. Templates are account-owned, so filtering on the caller's + // user_id hid templates that a teammate created — leaving them unable + // to send approved templates in a shared account. const { data, error } = await supabase .from("message_templates") .select("*") - .eq("user_id", user.id) .eq("status", "APPROVED") .order("created_at", { ascending: false });