Flarum (2.x)
    Preparing search index...

    Holds the set of users currently typing in a discussion.

    The realtime socket feeds incoming client-typing events in via add, and the TypingIndicator component reads the live, expiry-pruned set via active. Keeping this state separate from PostStream lets the indicator be rendered anywhere — a theme or extension can hold its own TypingState and pass it to without touching PostStream.

    Index

    Constructors

    Properties

    truncationTimer: Timeout | null = null
    usersTyping: TypingUserMap = {}

    Methods

    • Record an incoming typing event.

      Whether we are allowed to know who is typing is decided server-side — a name only reaches us if we are entitled to it — so this just renders what arrived. A hidden user we are permitted to see is labelled as such, so it's clear they are invisible to everyone else.

      Parameters

      Returns void