Class MessageReplyModel
Represents metadata of a replied message in the SfChatUI component.
Inheritance
Namespace: Syncfusion.Blazor.InteractiveChat
Assembly: Syncfusion.Blazor.dll
Syntax
public class MessageReplyModel : Object
Remarks
Contains comprehensive information about the original message being replied to, including the author's details, message content, unique identifier, timestamp, and formatting options.
This model is used to display contextual information in threaded or inline replies, helping users understand the conversation flow and maintain context in chat interfaces.
- User - The original message author's information
- Text - The content of the original message
- MessageID - Unique identifier for message referencing
- Timestamp - When the original message was sent
- TimestampFormat - Custom formatting for timestamp display
Examples
Creating a message reply model:
var replyModel = new MessageReplyModel
{
User = originalAuthor,
Text = "Original message content",
MessageID = "msg-456",
Timestamp = DateTime.Now.AddHours(-2),
TimestampFormat = "MMM dd, yyyy hh:mm tt"
};
Constructors
MessageReplyModel()
Declaration
public MessageReplyModel()
Properties
MentionUsers
Gets or sets the array of users mentioned in the message.
Declaration
public List<UserModel> MentionUsers { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<UserModel> | An array of UserModel objects representing users referenced via the @mention feature. The default value is an empty array. |
Remarks
This property contains the list of users referenced via the @mention feature in the message text.
It is populated when mentions are selected from the suggestion popup during message composition.
The property is optional and defaults to an empty array if no mentions are included in the message.
MessageID
Gets or sets the unique identifier of the original replied message.
Declaration
public string MessageID { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.String representing the unique message identifier. The default value is an empty string. |
Remarks
This identifier can be used for referencing, tracking, or linking to the original message within the chat system.
Supports message navigation, anchoring in threaded conversations, and maintaining referential integrity between related messages.
Text
Gets or sets the content of the original replied message.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.String representing the text content of the original message. The default value is an empty string. |
Remarks
Used to display a snippet or full text of the original message being replied to. This content is typically rendered in a visually distinct section above the current message to provide context.
The text may be truncated or formatted differently depending on the chat interface's design requirements.
Timestamp
Gets or sets the date and time when the original message was sent.
Declaration
public Nullable<DateTime> Timestamp { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<System.DateTime> | A System.DateTime representing the original message timestamp. The default value is System.DateTime.MinValue. |
Remarks
Used to provide temporal context in reply previews, showing when the original message was posted relative to the current message.
This timestamp helps users understand the chronological relationship between messages in threaded conversations.
TimestampFormat
Gets or sets the format used to display the message timestamp.
Declaration
public string TimestampFormat { get; set; }
Property Value
Type | Description |
---|---|
System.String | A System.String specifying the timestamp display format. The default value is an empty string. |
Remarks
Supports standard .NET date and time format strings (e.g., "dd/MM/yyyy hh:mm"
, "MMM dd, yyyy"
). When empty, the format defaults to the application's current culture settings.
This property ensures consistent time display across different locales and platforms, allowing for customized timestamp presentation in reply contexts.
User
Gets or sets the user who sent the original replied message.
Declaration
public UserModel User { get; set; }
Property Value
Type | Description |
---|---|
UserModel | A UserModel containing the original message author's information. The default value is null. |
Remarks
This property holds a reference to the UserModel of the original sender, enabling the display of user-specific details such as name, avatar, or role in the reply context.
When null, the reply context may display generic or anonymous user information depending on the chat implementation.