<commit_before>'use strict';

// Create the 'chat' controller
angular.module('chat').controller('ChatController', ['$scope', 'Socket',
    function($scope, Socket) {
    	// Create a messages array
        $scope.messages = [];
        
        // If user is not signed in then redirect back home
        if (!Authentication.user) $location.path('/');
        
        // Make sure the Socket is connected
        if (!Socket.socket) {
            Socket.connect();
        }

        // Add an event listener to the 'chatMessage' event
        Socket.on('chatMessage', function(message) {
            $scope.messages.unshift(message);
        });
        
        // Create a controller method for sending messages
        $scope.sendMessage = function() {
        	// Create a new message object
            var message = {
                text: this.messageText<commit_msg>Added missing dependency injection in Chat<commit_after>'use strict';

// Create the 'chat' controller
angular.module('chat').controller('ChatController', ['$scope', '$location', 'Authentication', 'Socket',
    function($scope, $location, Authentication, Socket) {
    	// Create a messages array
        $scope.messages = [];
        
        // If user is not signed in then redirect back home
        if (!Authentication.user) $location.path('/');
        
        // Make sure the Socket is connected
        if (!Socket.socket) {
            Socket.connect();
        }

        // Add an event listener to the 'chatMessage' event
        Socket.on('chatMessage', function(message) {
            $scope.messages.unshift(message);
        });
        
        // Create a controller method for sending messages
        $scope.sendMessage = function() {
        	// Create a new message object
            var message = {
                text: this.messageText
{'fraction_non_alphanumeric': 0.11636759108210984, 'fraction_numerical': 0.0, 'mean_word_length': 2.036303630363036, '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': '5041561', 'n_tokens_mistral': 452, 'n_tokens_neox': 443, 'n_words': 142}