Closing a dhx.message

Sometimes is desirable to close a dhx.message, for example, if the number of messages opened exceeds some value. Currently this feature is not available in Suite 7. Previous versions allow to to close a message by Id. But looking at the current implementation another solution could be considered. Instead of returning nothing, the function dhx.message could return a function that close the current generated message.

function message(props) {
    // ....
    return () => onExpire(messageBox, true)
}