<commit_before>Template.messageForm.events({
    'submit .ui.message.form': function (event) {
        event.preventDefault();

        var offerId = FlowRouter.getParam('offerId'),
            $message = $(event.target).find('.field .message'),
            messageAttributes = {
                offerId: offerId,
                message: $message.val()
            };

        // @TODO: offerId determines where messages will show
        console.log(messageAttributes);
    }
});<commit_msg>messages module currently working - needs testing<commit_after>Template.messageForm.events({
    'submit .ui.message.form': function (event) {
        event.preventDefault();

        var offerId = FlowRouter.getParam('offerId'),
            $message = $(event.target).find('.field .message'),
            messageAttributes = {
                offerId: offerId,
                message: $message.val()
            };

        Meteor.call('sendMessage', messageAttributes, function(error) {
           if (error) {
               return console.error(error.reason);
           } else {
               $message.val('');
           }
        });
    }
});
{'fraction_non_alphanumeric': 0.13187772925764193, 'fraction_numerical': 0.0, 'mean_word_length': 1.9086294416243654, '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': '7147789', 'n_tokens_mistral': 294, 'n_tokens_neox': 286, 'n_words': 56}