Type alias MessagesDifferenceEvent

MessagesDifferenceEvent: InternalMessage & {
    hasMore: boolean;
    messages: Message[];
    newCursor: number;
    resyncRequired: boolean;
    targetEntityId: MessageTargetEntityId;
    targetEntityType: MessageTargetEntityType;
}

Catch up state of a single entity: messages changed after the requested cursor, with their actual state.

Messages are deduplicated by id and ordered by their journal seq. Apply them by replacing the local copy with the same id, then store newCursor as the new cursor of the entity.

Type declaration

  • hasMore: boolean

    Response was truncated, either by limit or by the internal selection cap of the server, request the next page with sinceCursor = newCursor

  • messages: Message[]
  • newCursor: number

    Cursor to store after the whole response is applied. Never decreases.

  • resyncRequired: boolean

    Client is behind the journal retention, messages are empty, a full loadMessages is required

  • targetEntityId: MessageTargetEntityId
  • targetEntityType: MessageTargetEntityType