clearPinnedMessage

Clears the currently pinned message from the chat.

Example

<div id="chat"></div>
<script>
let messagesData = [
    {
        id: 1,
        text: "This is a pinned message that will be cleared automatically after 4 seconds.",
        authorId: "admin",
        authorName: "Admin",
        authorImageUrl: "https://demos.telerik.com/kendo-ui/content/web/Customers/RICSU.jpg",
        timestamp: new Date(2026, 0, 1, 9, 0),
        isPinned: true
    },
    {
        id: 2,
        text: "You can see the pinned message at the top of the chat.",
        authorId: "user",
        authorName: "User",
        authorImageUrl: "https://demos.telerik.com/kendo-ui/content/web/Customers/LONEP.jpg",
        timestamp: new Date(2026, 0, 1, 9, 5)
    }
];

let chat = $("#chat").kendoChat({
    authorId: "user",
    dataSource: messagesData
}).data("kendoChat");

// Clear pinned message after 4 seconds
setTimeout(function() {
    chat.clearPinnedMessage();
}, 4000);
</script>
In this article
clearPinnedMessage
Not finding the help you need?
Contact Support