Message content

Every message has "content" which specifies the information in the message. This could be some formatted text, a file attachment, or a shared location.

See the conceptual documentation for message content to learn more about how TalkJS represents message content.

class ContentBlock

Properties

type
: String

data class TextBlock

Method Overview

Properties

type
: String
children
: List<Any>

constructor

new TextBlock.constructor(type, children)

Parameters

type
: String
children
: List<Any>

class FileBlock

Properties

subtype (optional)
: String?
fileToken
: String
url
: String
size
: Int
filename
: String
type
: String
Full documentation of each FileBlock variant

data class GenericFileBlock

Method Overview

Properties

type
: String
fileToken
: String
url
: String
size
: Int
subtype (optional)
: String?
filename
: String

constructor

new GenericFileBlock.constructor(type, fileToken, url, size, subtype, filename)

Parameters

type
: String
fileToken
: String
url
: String
size
: Int
subtype (optional)
: String?
filename
: String

data class VideoBlock

Method Overview

Properties

type
: String
fileToken
: String
url
: String
size
: Int
subtype
: String
filename
: String
width (optional)
: Double?
height (optional)
: Double?
duration (optional)
: Double?

constructor

new VideoBlock.constructor(type, fileToken, url, size, subtype, filename, width, height, duration)

Parameters

type
: String
fileToken
: String
url
: String
size
: Int
subtype
: String
filename
: String
width (optional)
: Double?
height (optional)
: Double?
duration (optional)
: Double?

data class ImageBlock

Method Overview

Properties

type
: String
fileToken
: String
url
: String
size
: Int
subtype
: String
filename
: String
width (optional)
: Double?
height (optional)
: Double?

constructor

new ImageBlock.constructor(type, fileToken, url, size, subtype, filename, width, height)

Parameters

type
: String
fileToken
: String
url
: String
size
: Int
subtype
: String
filename
: String
width (optional)
: Double?
height (optional)
: Double?

data class AudioBlock

Method Overview

Properties

type
: String
fileToken
: String
url
: String
size
: Int
subtype
: String
filename
: String
duration (optional)
: Double?

constructor

new AudioBlock.constructor(type, fileToken, url, size, subtype, filename, duration)

Parameters

type
: String
fileToken
: String
url
: String
size
: Int
subtype
: String
filename
: String
duration (optional)
: Double?

data class VoiceBlock

Method Overview

Properties

type
: String
fileToken
: String
url
: String
size
: Int
subtype
: String
filename
: String
duration (optional)
: Double?

constructor

new VoiceBlock.constructor(type, fileToken, url, size, subtype, filename, duration)

Parameters

type
: String
fileToken
: String
url
: String
size
: Int
subtype
: String
filename
: String
duration (optional)
: Double?

data class LocationBlock

Method Overview

Properties

type
: String
latitude
: Double
longitude
: Double

constructor

new LocationBlock.constructor(type, latitude, longitude)

Parameters

type
: String
latitude
: Double
longitude
: Double

data class SendFileBlock

Method Overview

Properties

type
: String
fileToken
: String

constructor

new SendFileBlock.constructor(type, fileToken)

Parameters

type
: String
fileToken
: String