PrivilegedMailbox

struct PrivilegedMailbox : Sendable

Describes one privileged shared mailbox: a non-loginable phantom User (see PrivilegedUser) that stands in for “every real user who satisfies requirement”. A chat addressed to, or containing, the phantom account is really addressed to every member of that roster, each of whom gets their own Redis unread count under inbox (see MailInbox).

PrivilegedMailbox.all is the single source of truth for every “@moderator”/“@TwitarrTeam”-shaped mailbox’s notification bookkeeping: the chat-unread fan-out, the ?foruser= access checks, and the nightly consistency job all key off this table, so adding a new mailbox (see issue #517) means appending a row here, adding a MailInbox case, and seeding its phantom account. It does NOT cover authoring or UI: FezController.createChat‘s createdByModerator/ createdByTwitarrTeam fields, PostContentData.effectiveAuthor, SiteSeamailController’s postAsModerator/postAsTwitarrTeam fields, and ForumController.processForumMentions still hardcode the moderator/TwitarrTeam pair and need their own updates for a new mailbox to be usable end-to-end.