<commit_before>var NRS = (function(NRS, $, undefined) {
	NRS.messages = {};

	NRS.pages.messages = function(callback) {
		NRS.pageLoading();

		$(".content.content-stretch:visible").width($(".page:visible").width());

		NRS.sendRequest("getAccountTransactionIds+", {
			"account": NRS.account,
			"timestamp": 0,
			"type": 1,
			"subtype": 0
		}, function(response) {
			if (response.transactionIds && response.transactionIds.length) {
				var transactionIds = response.transactionIds.reverse().slice(0, 100);
				var nrTransactions = transactionIds.length;

				NRS.messages = {};

				var transactionsChecked = 0;

				for (var i = 0; i < nrTransactions; i++) {
					NRS.sendRequest("getTransaction+", {
						"transaction": transactionIds[i]
					}, function(response) {
						//check if error.

						if (NRS.currentPage != "messages") {
							return;
						}

						transactionsChecked++;

						var otherUser = (response.recipient == NRS.account ? response.sender : response.recipient);

						if (!(otherUser in NRS.messages)) {
							NRS.messages[otherUser] = [];
						}

						NRS.messages[otherUser].push(response);

						if (transactionsChecked == nrTransactions) {
							var rows = "";
							var menu = "";

							var sortedMessages = [];

							for (var otherUser in NRS.messages) {
								NRS.messages[otherUser].sort(function(a, b) {
									if (a.timestamp > b.timestamp) {
										return 1;
									} else if (a.timestamp < b.timestamp) {
										return -1;
									} else {
										return 0;
									}
								});

								var otherUserRS = (otherUser == response.sender ? response.senderRS : response.recipientRS);

								sortedMessages.push({<commit_msg>Reed solomon fix for message sidebar.<commit_after>var NRS = (function(NRS, $, undefined) {
	NRS.messages = {};

	NRS.pages.messages = function(callback) {
		NRS.pageLoading();

		$(".content.content-stretch:visible").width($(".page:visible").width());

		NRS.sendRequest("getAccountTransactionIds+", {
			"account": NRS.account,
			"timestamp": 0,
			"type": 1,
			"subtype": 0
		}, function(response) {
			if (response.transactionIds && response.transactionIds.length) {
				var transactionIds = response.transactionIds.reverse().slice(0, 100);
				var nrTransactions = transactionIds.length;

				NRS.messages = {};

				var transactionsChecked = 0;

				for (var i = 0; i < nrTransactions; i++) {
					NRS.sendRequest("getTransaction+", {
						"transaction": transactionIds[i]
					}, function(response) {
						//check if error.

						if (NRS.currentPage != "messages") {
							return;
						}

						transactionsChecked++;

						var otherUser = (response.recipient == NRS.account ? response.sender : response.recipient);

						if (!(otherUser in NRS.messages)) {
							NRS.messages[otherUser] = [];
						}

						NRS.messages[otherUser].push(response);

						if (transactionsChecked == nrTransactions) {
							var rows = "";
							var menu = "";

							var sortedMessages = [];

							for (var otherUser in NRS.messages) {
								NRS.messages[otherUser].sort(function(a, b) {
									if (a.timestamp > b.timestamp) {
										return 1;
									} else if (a.timestamp < b.timestamp) {
										return -1;
									} else {
										return 0;
									}
								});

								var otherUserRS = (otherUser == NRS.messages[otherUser][0].sender ? NRS.messages[otherUser][0].senderRS : NRS.messages[otherUser][0].recipientRS);

								sortedMessages.push({
{'fraction_non_alphanumeric': 0.14755043227665707, 'fraction_numerical': 0.0077809798270893375, 'mean_word_length': 2.6307531380753137, 'pattern_counts': {'":': 10, '<': 7, '<?xml version=': 0, '>': 5, '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': '893125', 'n_tokens_mistral': 1505, 'n_tokens_neox': 1045, 'n_words': 206}