Skip to main content

Interface: ChatObject

SDK.ChatObject

We have included in the Room model methods for implementing a chat interface between the Participants of a WebRTC Room. Chat messages are stored as instances of this ChatObject model.

(See: sendChatMessage, useChatHistory)

Hierarchy

  • ChatDataObject

    ChatObject

Properties

content

content: string

content of chat message

Inherited from

ChatDataObject.content

Defined in

api.stream-studio-kit/src/core/webrtc/room-context.ts:57


displayName

displayName: string

Display name of message sender. This is included in addition to the sender's id so that messages can be displayed properly even after the sender has left the Room.

Defined in

api.stream-studio-kit/src/core/webrtc/room-context.ts:85


metadata

Optional metadata: string | object

Field for miscellaneous data

Inherited from

ChatDataObject.metadata

Defined in

api.stream-studio-kit/src/core/webrtc/room-context.ts:66


recipients

Optional recipients: string[]

Identities of the recipient Participants. Only specified if it is a private message. Otherwise, it is undefined.

Inherited from

ChatDataObject.recipients

Defined in

api.stream-studio-kit/src/core/webrtc/room-context.ts:62


sender

sender: string

identity of sender

Defined in

api.stream-studio-kit/src/core/webrtc/room-context.ts:80


timestamp

timestamp: number

Inherited from

ChatDataObject.timestamp

Defined in

api.stream-studio-kit/src/core/webrtc/room-context.ts:58


type

type: ChatMessage

Always 'ChatMessage'

Inherited from

ChatDataObject.type

Defined in

api.stream-studio-kit/src/core/webrtc/room-context.ts:53