Skip to content

Filter

Defined in: src/filter.ts:85

new Filter(userId, filterId?): Filter

Defined in: src/filter.ts:108

Construct a new Filter.

string | null | undefined

The user ID for this filter.

string

The filter ID if known.

Filter

optional filterId?: string

Defined in: src/filter.ts:110

The filter ID if known.


readonly userId: string | null | undefined

Defined in: src/filter.ts:109

The user ID for this filter.


static LAZY_LOADING_MESSAGES_FILTER: object

Defined in: src/filter.ts:86

lazy_load_members: boolean = true

filterRoomTimeline(events): DigitalWorldEvent[]

Defined in: src/filter.ts:212

Filter the list of events based on whether they are allowed in a timeline based on this filter

DigitalWorldEvent[]

the list of events being filtered

DigitalWorldEvent[]

the list of events which match the filter


getDefinition(): IFilterDefinition

Defined in: src/filter.ts:125

Get the JSON body of the filter.

IFilterDefinition

The filter definition


getFilterId(): string | undefined

Defined in: src/filter.ts:117

Get the ID of this filter on your hub (if known)

string | undefined

The filter ID


getRoomTimelineFilterComponent(): FilterComponent | undefined

Defined in: src/filter.ts:202

Get the room.timeline filter component of the filter

FilterComponent | undefined

room timeline filter component


setDefinition(definition): void

Defined in: src/filter.ts:133

Set the JSON body of the filter

IFilterDefinition

The filter definition

void


setIncludeLeaveRooms(includeLeave): void

Defined in: src/filter.ts:255

Control whether left rooms should be included in responses.

boolean

True to make rooms the user has left appear in responses.

void


setLazyLoadMembers(enabled): void

Defined in: src/filter.ts:246

boolean

void


setTimelineLimit(limit): void

Defined in: src/filter.ts:226

Set the max number of events to return for each room’s timeline.

number

The max number of events to return for each room.

void


setUnreadThreadNotifications(enabled): void

Defined in: src/filter.ts:233

Enable threads unread notification

boolean

void


setUnstableMSC4429SyncUserProfiles(ids, stable): void

Defined in: src/filter.ts:265

Set the list of fields to be included in the profile information sent down the sync stream.

string[]

The field IDs to sync.

boolean

Whether to use the stable or unstable versions of this filter.

void


static fromJson(userId, filterId, jsonObj): Filter

Defined in: src/filter.ts:93

Create a filter from existing data.

string | null | undefined

string

IFilterDefinition

Filter