matrix-js-sdk
    Preparing search index...

    Class DanglingReceipts

    All the receipts that we have received but can't process because we can't find the event they refer to.

    We hold on to them so we can process them if their event arrives later. To keep the public receiptsByEventId index consistent with the legacy behaviour, we also push dangling receipts into the reverse cache (with the per-(userId, type) eviction semantics).

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Remember the supplied dangling receipt. Only stores it as the latest if it isn't strictly older (by ts) than an existing dangling receipt for the same (userId, receiptType). Updates the public reverse cache regardless, so consumers see the cached receipts.

      Parameters

      Returns void

    • Remove and return the dangling receipts for the given event ID.

      Parameters

      • eventId: string

        the event ID to look for

      Returns DanglingReceipt[] | undefined

      the found dangling receipts, or undefined if we don't have one.