Cotal TypeScript packages
    Preparing search index...

    Function resolveDmTarget

    • Resolve a DM target before any effect. A { principal } target, or a typed string that parses as a principal <owner>.<actor>, goes to that principal as is, whether or not it is present or was heard from. It is never matched against display names, so a peer whose display name spells a principal cannot capture it; that peer is reached by its own principal or /reply. Any other string is a display name, which must name one principal across the roster and the heard senders: a name both carry refuses and lists them instead of picking the present one. Absence is a verdict only on a current roster (endpoint.ts:2816-2823).

      Parameters

      • to: DmTarget
      • roster: readonly Presence[]
      • rosterState: "stale" | "current" | "unpopulated"
      • engine: ParticipantEngine
      • self: { answerOne: string; name?: string; principal: string }

      Returns Refused | { id: string; name: string }