MessageReplyModel
6 Jul 20262 minutes to read
Interface for a class MessageReply
Properties
attachedFile FileInfo
Represents the attached files of the message sent by a user in the Chat UI component.
mentionUsers UserModel[]
Represents the mentioned Users of the message sent by the replied user in the Chat UI component.
<div id='container' style="height: 380px; width: 450px;">
<div id="mention-user"></div>
</div>import { ChatUI, UserModel, MessageModel } from '@syncfusion/ej2-interactive-chat';
import { enableRipple } from '@syncfusion/ej2-base';
enableRipple(true);
let currentUserModel: UserModel = {
id: "user1",
user: "Albert"
};
let michaleUserModel: UserModel = {
id: "user2",
user: "Michale Suyama"
};
let customUserModel = {
id : "custom-user",
user : "Reena"
}
let chatMessages: MessageModel[] = [
{
author: currentUserModel,
text: "Want to get coffee tomorrow?"
},
{
author: michaleUserModel,
text: "Sure! What time?"
},
{
author: currentUserModel,
text: "{0} How about 10 AM?",
mentionUsers: [michaleUserModel]
}
];
// Initializes the Chat UI control
let chatUI: ChatUI = new ChatUI({
headerText: "TeamSync Professionals",
messages: chatMessages,
mentionUsers: [ currentUserModel, customUserModel ],
user: currentUserModel
});
// Render initialized Chat UI.
chatUI.appendTo('#mention-user');messageID string
Represents the id of the message sent by the replied user in the Chat UI component.
text string
Represents the content of the message sent by a user in the Chat UI component.
timestamp Date
Specifies the timestamp of when the replied message was sent.
This property holds a Date object that represents the exact time the message was created, providing context to the conversation flow.
timestampFormat string
Specifies the format of the timestamp for displaying the reply message’s sending time.
If empty, the format is determined by the application’s culture settings.
Supports format strings like ‘dd/MM/yyyy hh:mm’.
user UserModel
Specifies the author of the message in the Chat UI component.
This property references a UserModel object that contains details about the user who sent the message.