ConversationBuilder class

A Conversation Builder represents a conversation that is about to be created, fetched, or updated. You can use this object to set up or modify a conversation before showing it.

Note: any changes you make here will not be sent to TalkJS immediately. Instead, instantiate a TalkJS UI using methods such as {@link Session.createInbox}.

Annotations
  • @JS()
  • @anonymous

Constructors

ConversationBuilder()
factory

Properties

custom ↔ dynamic
Allows custom conversation metadata to be stored in the form { [name: string]: string }
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
photoUrl String?
An optional URL to a photo which will be shown as the photo for the conversation.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
subject String?
An optional conversation subject which will be displayed in the chat header.
getter/setter pair
welcomeMessages List<String>?
Messages which are sent at the beginning of a chat. In this case the messages will appear as system messages.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sendMessage(String text, SendMessageOptions options) → dynamic
Sends a text message in a given conversation. @param text - The message body that is to be sent.
setAttributes(ConversationAttributes attributes) → void
Used to set certain attributes for a specific conversation
setParticipant(User user, [dynamic settings]) → void
Sets a participant of the conversation.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited