Conversation.

Static methods

staticcreate(instanceId:String, topic:String):Conversation

Creates a new conversation, linked to the given instanceId, and with the specified topic.

Returns:

The created Conversation.

staticget(id:String):Conversation

Returns:

The Conversation with the given id, or null if it was not found.

staticlist(filters:Query):Collection<Conversation>

Lists conversations.

Returns:

A collection of Conversations.

Constructor

new()

Variables

created:DateTime

Date of the Conversation creation.

creator:User

Creator of the conversation.

instanceId:String

The id of object based on which discussion is made, e.g. listing request. It can be any object.

messages:Collection<Message>

Collection of messages.

topic:String

Conversation topic.

Methods

createMessage(text:String):Message

Creates a new message in this Conversation with the given text, as long as the text is not the same as the one in the last Message.

Returns:

The created Message, or null if the last message in the Conversation is the same as this one.

Inherited Variables

Defined by IdModel

id:String

Id of the model.

Inherited Methods

Defined by Model

toObject():Dynamic

Returns:

A Haxe dynamic object with a shallow copy of this model's properties.

toString():String

Returns:

A String with the JSON representation of this Model.