<commit_before>/**
Template Controllers

@module Templates
*/

/**
The chats aside template

@class [template] views_chats_aside
@constructor
*/

Template['views_chats_aside'].onCreated(function(){
    this.autorun(function(){

        var unreadCount = Messages.find({unread: true}).count();
        if(unreadCount)
            mist.menu.setBadge(unreadCount + ' unread messages');
        else
            mist.menu.setBadge('');
    });
});<commit_msg>made mist object not requried<commit_after>/**
Template Controllers

@module Templates
*/

/**
The chats aside template

@class [template] views_chats_aside
@constructor
*/

Template['views_chats_aside'].onCreated(function(){
    this.autorun(function(){

        var unreadCount = Messages.find({unread: true}).count();
        if(typeof mist !== 'undefined') {
            if(unreadCount)
                mist.menu.setBadge(unreadCount + ' unread messages');
            else
                mist.menu.setBadge('');
        }
    });
});
{'fraction_non_alphanumeric': 0.14185110663983905, 'fraction_numerical': 0.0, 'mean_word_length': 2.932806324110672, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4879647', 'n_tokens_mistral': 305, 'n_tokens_neox': 300, 'n_words': 57}