Type alias GetMessagesDifferenceConfig

GetMessagesDifferenceConfig: {
    cachedRanges?: CachedRange[];
    limit?: number;
    sinceCursor?: number;
    targetEntityId: MessageTargetEntityId;
    targetEntityType: MessageTargetEntityType;
}

Config of the getMessagesDifference operation

Type declaration

  • Optional cachedRanges?: CachedRange[]

    Intervals of the history the client holds, sorted by CachedRange.from and non overlapping, at most MAX_CACHED_RANGES of them. A change is sent when the date of its message falls into one of the intervals, so a client that caches its entities in full leaves the field out.

    An empty list is the same as no field at all: both mean the whole history, there is no way to declare an empty coverage. A client holding nothing of an entity has nowhere to apply the response and should not ask for a difference at all.

  • Optional limit?: number
  • Optional sinceCursor?: number
  • targetEntityId: MessageTargetEntityId
  • targetEntityType: MessageTargetEntityType

Param: sinceCursor

last cursor known to the client for this entity, 0 to read the journal from the beginning

Param: limit

maximum number of messages in a single response, 0 to use the server default