Files
Khalid Abdi b74d5d2d05 feat: username reset, system-message UX, meetings polish, sidebar identity
- auth: forgot-password now has Email/Username tabs; new public
  /api/auth-helpers/reset-by-username resolves a username and hands off to the
  existing reset flow (real email or admin-notify fallback)
- messages: conversations expose isSystem; System notices are read-only (no
  composer, no call button) and styled distinctly (shield icon + badge)
- meetings: compact, larger control bar; self tile shows real initials and an
  avatar (not black) when the camera is off; delete-room UI with confirm
- sidebar: username-only accounts show @username instead of a synthetic email

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-20 22:39:48 +03:00

16 lines
552 B
TypeScript

import { apiFetch } from "@/lib/api-client";
// Start a password reset by username (for staff who sign in with a username
// rather than an email). The backend resolves the username to its account and
// hands off to Better Auth's reset flow. Always resolves; never reveals whether
// the username exists.
export async function requestResetByUsername(
username: string,
redirectTo: string,
): Promise<void> {
await apiFetch("/api/auth-helpers/reset-by-username", {
method: "POST",
body: JSON.stringify({ username, redirectTo }),
});
}