import { useAuthServiceContext } from '../services/AuthService'; /** P9: room-only identity. Ordinary messaging keeps the home identity (`getCurrentUserReference`, * unchanged), but under act-as a video room's receipts and "mine" must name the RelatedPerson the * caller is acting as (useActAs.tsx:144 builds that same reference), never the account they logged * in as. Used only by MeetingWindow. */ export const useRoomSelfReference = (homeReference: string | null): string | null => { const { actingAs } = useAuthServiceContext(); if (actingAs?.relatedPersonId) return `RelatedPerson/${actingAs.relatedPersonId}`; return homeReference; };