messageStatusTemplateFunction(default: null)
A custom template function for rendering message status indicators. Receives a context object with status (the status string) and message (the message object). When set, this overrides the default status rendering and messageStatusSettings.
Example
<div id="chat"></div>
<script>
let messagesData = [
{
id: 1,
text: "Message with custom status template",
authorId: "user1",
authorName: "John Doe",
timestamp: new Date(2026, 0, 1, 9, 0),
status: "seen"
}
];
$("#chat").kendoChat({
messageStatusTemplate: function(ctx) {
var colors = { sent: "#999", delivered: "#4CAF50", seen: "#2196F3", failed: "#f44336" };
return '<span style="color:' + (colors[ctx.status] || "#999") + '">' +
'[' + ctx.status.toUpperCase() + ']</span>';
},
authorId: "user1",
dataSource: messagesData
});
</script>