Documentation / @imvu/client / ChatParticipant
Class: ChatParticipant
Defined in: packages/client/src/resources/ChatParticipant.ts:9
Someone in a classic room's chat: <chat>/participants/user-<cid>. Readable by any logged-in account without joining the room.
Extends
Constructors
Constructor
new ChatParticipant(client, options?): ChatParticipant;Defined in: packages/client/src/resources/Resource.ts:23
Parameters
| Parameter | Type |
|---|---|
client | Client |
options? | ResourceOptions |
Returns
ChatParticipant
Inherited from
Properties
_id
_id: string = '';Defined in: packages/client/src/resources/Resource.ts:21
Inherited from
_url
protected _url: string = '';Defined in: packages/client/src/resources/RemoteDocument.ts:13
Inherited from
assetUrl
assetUrl: string = '';Defined in: packages/client/src/resources/ChatParticipant.ts:19
client
protected readonly client: Client;Defined in: packages/client/src/resources/RemoteDocument.ts:16
Inherited from
created
created: string = '';Defined in: packages/client/src/resources/ChatParticipant.ts:11
When they joined (ISO 8601).
fetchedAt
fetchedAt: number = 0;Defined in: packages/client/src/resources/Resource.ts:39
When this instance last received data from the API (ms since epoch); 0 if never.
Inherited from
lastUpdated
lastUpdated: string = '';Defined in: packages/client/src/resources/ChatParticipant.ts:12
lookImage
lookImage: string = '';Defined in: packages/client/src/resources/ChatParticipant.ts:17
lookThumbnail
lookThumbnail: string = '';Defined in: packages/client/src/resources/ChatParticipant.ts:18
lookUrl
lookUrl: string = '';Defined in: packages/client/src/resources/ChatParticipant.ts:16
https://api.imvu.com/look/<pid>%2C<pid>…: the outfit as product ids. See productIds.
nftProductIds
nftProductIds: string[] = [];Defined in: packages/client/src/resources/ChatParticipant.ts:22
options
protected options: ResourceOptions = {};Defined in: packages/client/src/resources/Resource.ts:25
Inherited from
outfitGender
outfitGender: string = '';Defined in: packages/client/src/resources/ChatParticipant.ts:20
relations
relations: Partial<TRelations> = {};Defined in: packages/client/src/resources/Resource.ts:44
Internal
Inherited from
renderedImage
renderedImage: string = '';Defined in: packages/client/src/resources/ChatParticipant.ts:21
revision
revision: number = 0;Defined in: packages/client/src/resources/RemoteDocument.ts:8
Inherited from
seatFurniId
seatFurniId: number = 0;Defined in: packages/client/src/resources/ChatParticipant.ts:14
seatNumber
seatNumber: number = 0;Defined in: packages/client/src/resources/ChatParticipant.ts:13
stale
stale: boolean = false;Defined in: packages/client/src/resources/RemoteDocument.ts:9
Inherited from
updates
updates: Partial<TUpdates> = {};Defined in: packages/client/src/resources/Resource.ts:49
Internal
Inherited from
updateTarget
updateTarget:
| APIUpdateTarget
| null
| undefined;Defined in: packages/client/src/resources/RemoteDocument.ts:11
Undefined until metadata is loaded; null means the API explicitly provides no update target.
Inherited from
Accessors
id
Get Signature
get id(): string;Defined in: packages/client/src/resources/Resource.ts:34
Returns
string
Inherited from
productIds
Get Signature
get productIds(): string[];Defined in: packages/client/src/resources/ChatParticipant.ts:45
The outfit's product ids, avatar body first, decoded from lookUrl.
Returns
string[]
url
Get Signature
get url(): string;Defined in: packages/client/src/resources/RemoteDocument.ts:28
Canonical REST URL and cache identity for this document.
Returns
string
Inherited from
user
Get Signature
get user():
| User<UserRelations>
| undefined;Defined in: packages/client/src/resources/ChatParticipant.ts:53
The participant's user, from the cache. Participant reads embed the full user, so this is normally set without any request. Use fetchUser when it is not.
Returns
| User<UserRelations> | undefined
userId
Get Signature
get userId(): string;Defined in: packages/client/src/resources/ChatParticipant.ts:40
The participant's user id (cid), from the canonical URL.
Returns
string
Methods
_applyRemoteMetadata()
_applyRemoteMetadata(url, updateTarget): void;Defined in: packages/client/src/resources/RemoteDocument.ts:33
Internal
Apply address/update metadata from an authoritative REST response.
Parameters
| Parameter | Type |
|---|---|
url | string |
updateTarget | APIUpdateTarget | null |
Returns
void
Inherited from
_hydrate()
_hydrate(node): void;Defined in: packages/client/src/resources/Resource.ts:69
Internal
Refresh this canonical instance from an authoritative REST document.
Parameters
| Parameter | Type |
|---|---|
node | APIResource |
Returns
void
Inherited from
_invalidate()
_invalidate(): void;Defined in: packages/client/src/resources/RemoteDocument.ts:40
Internal
Mark this document stale after an IMQ invalidation.
Returns
void
Inherited from
_patch()
_patch(data): void;Defined in: packages/client/src/resources/ChatParticipant.ts:24
Internal
Assign fields from a raw (possibly partial) API payload. Used by build for the initial data and, later, by IMQ for in-place live updates — hence the in guards, so a partial payload only touches the fields it carries. Subclasses override this and call super._patch(data).
Parameters
| Parameter | Type |
|---|---|
data | Record<string, any> |
Returns
void
Overrides
authenticated()
protected authenticated(): void;Defined in: packages/client/src/resources/Resource.ts:104
Returns
void
Inherited from
collectionRelationship()
protected collectionRelationship<T, K>(
relation,
cls,
options?
): Collection<T>;Defined in: packages/client/src/resources/Resource.ts:122
Type Parameters
| Type Parameter |
|---|
T extends Resource<APIRelations, APIUpdateTarget> |
K extends "ref" |
Parameters
| Parameter | Type |
|---|---|
relation | K |
cls | Constructor<T> |
options? | CollectionOptions |
Returns
Collection<T>
Inherited from
Resource.collectionRelationship
fetchUser()
fetchUser(options?): Promise<User<UserRelations>>;Defined in: packages/client/src/resources/ChatParticipant.ts:59
The participant's user, read from the API only if it is not cached.
Parameters
| Parameter | Type |
|---|---|
options? | FetchOptions |
Returns
Promise<User<UserRelations>>
refresh()
refresh(): Promise<ChatParticipant>;Defined in: packages/client/src/resources/Resource.ts:95
Re-read this resource from REST and update it in place. Resolves to the same instance, so references held elsewhere see the fresh data and stale clears.
Returns
Promise<ChatParticipant>
Inherited from
relationship()
protected relationship<T, K>(
relation,
cls,
options?
): Promise<T | null>;Defined in: packages/client/src/resources/Resource.ts:110
Type Parameters
| Type Parameter |
|---|
T extends Resource<APIRelations, APIUpdateTarget> |
K extends "ref" |
Parameters
| Parameter | Type |
|---|---|
relation | K |
cls | Constructor<T> |
options? | FetchOptions |
Returns
Promise<T | null>
Inherited from
watch()
watch(): Promise<DocumentWatch<ChatParticipant>>;Defined in: packages/client/src/resources/RemoteDocument.ts:46
Observe explicit IMQ invalidations for this document.
Returns
Promise<DocumentWatch<ChatParticipant>>
Inherited from
build()
static build<T>(
this,
client,
node
): T;Defined in: packages/client/src/resources/Resource.ts:57
Construct a resource from a raw API node, then populate it via _patch. No validation — we trust the wire types and rely on tests for API drift (see MODERNIZATION.md). Fields keep their defaults until _patch overwrites them, so an instance is never in an unset state.
Type Parameters
| Type Parameter |
|---|
T extends Resource<any, APIUpdateTarget> |
Parameters
| Parameter | Type |
|---|---|
this | new (client, options?) => T |
client | Client |
node | APIResource |
Returns
T