xi-conversations

Minimal clone of thunderbird conversations
git clone https://git.ce9e.org/xi-conversations.git

commit
e66fa0f216944054559eb73271b815cfdfbf4cf8
parent
ddad96ad34591f5640686c27657e75f340e2dc86
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2023-09-04 07:52
avoid commas in recipient names

Diffstat

M src/js/util.js 6 +++++-

1 files changed, 5 insertions, 1 deletions


diff --git a/src/js/util.js b/src/js/util.js

@@ -3,6 +3,10 @@ var trimQuotes = function(s) {
    3     3 	return s && s.endsWith(s[0]) && quotes.includes(s[0]) ? s.slice(1, -1) : s;
    4     4 };
    5     5 
   -1     6 var normalizeName = function(s) {
   -1     7 	return s.split(', ').reverse().join(' ');
   -1     8 }
   -1     9 
    6    10 var getParams = function() {
    7    11 	const params = {};
    8    12 	for (let part of location.search.substr(1).split('&')) {
@@ -99,7 +103,7 @@ var parseContacts = function(raw) {
   99   103 		var match = /(.*) <(.*)>/.exec(r);
  100   104 		if (match) {
  101   105 			contacts.push({
  102    -1 				name: trimQuotes(match[1]),
   -1   106 				name: normalizeName(trimQuotes(match[1])),
  103   107 				email: match[2],
  104   108 			});
  105   109 		} else {