Class NSChatMessage
A message in a chat session. Carrier object for ChatMessage.
Constructors
NSChatMessage()
Initializes a new instance of the NSChatMessage class.
Declaration
NSChatMessage Methods
GetAuthor()
Declaration
String GetAuthor() Examples
NSChatMessage thing;
String author = thing.GetAuthor();
Returns
| Type | Description |
| String | The author of the message. |
GetChatMessageId()
Declaration
Integer GetChatMessageId() Examples
NSChatMessage thing;
Integer chatMessageId = thing.GetChatMessageId();
Returns
| Type | Description |
| Integer | The primary key (auto-incremented). |
GetChatSessionId()
Declaration
Integer GetChatSessionId() Examples
NSChatMessage thing;
Integer chatSessionId = thing.GetChatSessionId();
Returns
| Type | Description |
| Integer | The reference to the associated chat session. |
GetMessage()
Declaration
String GetMessage() Examples
NSChatMessage thing;
String message = thing.GetMessage();
Returns
| Type | Description |
| String | The message. |
GetReadByCustomer()
Declaration
Integer GetReadByCustomer() Examples
NSChatMessage thing;
Integer readByCustomer = thing.GetReadByCustomer();
Returns
| Type | Description |
| Integer | Whether the message has been read by the customer or not. |
GetSpecialParam()
Declaration
String GetSpecialParam() Examples
NSChatMessage thing;
String specialParam = thing.GetSpecialParam();
Returns
| Type | Description |
| String | Special parameter for the special_type. |
GetSpecialType()
Declaration
Integer GetSpecialType() Examples
NSChatMessage thing;
Integer specialType = thing.GetSpecialType();
Returns
| Type | Description |
| Integer | Indicates if it is a special message, such as a URL redirection. See <xref href="CRMScript.NetServer.ChatMessageSpecialType" data-throw-if-not-resolved="false"></xref> |
GetType()
Declaration
Integer GetType() Examples
NSChatMessage thing;
Integer type = thing.GetType();
Returns
| Type | Description |
| Integer | The type of the message. See <xref href="CRMScript.NetServer.ChatMessageType" data-throw-if-not-resolved="false"></xref> |
GetWhenPosted()
Declaration
DateTime GetWhenPosted() Examples
NSChatMessage thing;
DateTime whenPosted = thing.GetWhenPosted();
Returns
| Type | Description |
| DateTime | When the message was posted (UTC timestamp). |
SetAuthor(String)
Declaration
Void SetAuthor(String author) Examples
NSChatMessage thing;
String author;
thing.SetAuthor(author);
Parameters
| Type | Name | Description |
| String | author | The author of the message. |
Returns
| Type | Description |
| Void |
SetChatMessageId(Integer)
Declaration
Void SetChatMessageId(Integer chatMessageId) Examples
NSChatMessage thing;
Integer chatMessageId;
thing.SetChatMessageId(chatMessageId);
Parameters
| Type | Name | Description |
| Integer | chatMessageId | The primary key (auto-incremented). |
Returns
| Type | Description |
| Void |
SetChatSessionId(Integer)
Declaration
Void SetChatSessionId(Integer chatSessionId) Examples
NSChatMessage thing;
Integer chatSessionId;
thing.SetChatSessionId(chatSessionId);
Parameters
| Type | Name | Description |
| Integer | chatSessionId | The reference to the associated chat session. |
Returns
| Type | Description |
| Void |
SetMessage(String)
Declaration
Void SetMessage(String message) Examples
NSChatMessage thing;
String message;
thing.SetMessage(message);
Parameters
| Type | Name | Description |
| String | message | The message. |
Returns
| Type | Description |
| Void |
SetReadByCustomer(Integer)
Declaration
Void SetReadByCustomer(Integer readByCustomer) Examples
NSChatMessage thing;
Integer readByCustomer;
thing.SetReadByCustomer(readByCustomer);
Parameters
| Type | Name | Description |
| Integer | readByCustomer | Whether the message has been read by the customer or not. |
Returns
| Type | Description |
| Void |
SetSpecialParam(String)
Declaration
Void SetSpecialParam(String specialParam) Examples
NSChatMessage thing;
String specialParam;
thing.SetSpecialParam(specialParam);
Parameters
| Type | Name | Description |
| String | specialParam | Special parameter for the special_type. |
Returns
| Type | Description |
| Void |
SetSpecialType(Integer)
Declaration
Void SetSpecialType(Integer specialType) Examples
NSChatMessage thing;
Integer specialType;
thing.SetSpecialType(specialType);
Parameters
| Type | Name | Description |
| Integer | specialType | Indicates if it is a special message, such as a URL redirection. See <xref href="CRMScript.NetServer.ChatMessageSpecialType" data-throw-if-not-resolved="false"></xref>. |
Returns
| Type | Description |
| Void |
SetType(Integer)
Declaration
Void SetType(Integer type) Examples
NSChatMessage thing;
Integer type;
thing.SetType(type);
Parameters
| Type | Name | Description |
| Integer | type | The type of the message. See <xref href="CRMScript.NetServer.ChatMessageType" data-throw-if-not-resolved="false"></xref>. |
Returns
| Type | Description |
| Void |