<commit_before>'use strict';

angular.module('pie')
.controller('DiscussController', function ($scope, authService, discussionService) {
	authService
	.ensureLogin()
	.then(function() {
		$scope.user = authService.user;
	});

	// Watch for a change on some discussionService properties
	$scope.$watch(
		function() { return discussionService.currentDiscussion; },
		function() { $scope.discussion = discussionService.currentDiscussion; },
		true
	);
	$scope.$watch(
		function() { return discussionService.currentState; },
		function() { $scope.currentState = discussionService.currentState; }
	);

	$scope.now = new Date();

	$scope.addPost = function(resolve) {
		// Form validation
		if (! $scope.newContent) return;

		discussionService.addPost($scope.user, $scope.newContent, resolve);

		// Clear inputs<commit_msg>Removed some user info added to a new post<commit_after>'use strict';

angular.module('pie')
.controller('DiscussController', function ($scope, authService, discussionService) {
	authService
	.ensureLogin()
	.then(function() {
		$scope.user = {
			login: authService.user.login,
			imgUrl: authService.user.imgUrl
		};
	});

	// Watch for a change on some discussionService properties
	$scope.$watch(
		function() { return discussionService.currentDiscussion; },
		function() { $scope.discussion = discussionService.currentDiscussion; },
		true
	);
	$scope.$watch(
		function() { return discussionService.currentState; },
		function() { $scope.currentState = discussionService.currentState; }
	);

	$scope.now = new Date();

	$scope.addPost = function(resolve) {
		// Form validation
		if (! $scope.newContent) return;

		discussionService.addPost($scope.user, $scope.newContent, resolve);

		// Clear inputs
{'fraction_non_alphanumeric': 0.1399652978600347, 'fraction_numerical': 0.0, 'mean_word_length': 4.824915824915825, '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': '968034', 'n_tokens_mistral': 539, 'n_tokens_neox': 495, 'n_words': 112}