Support non-BMP chars (e.g. emojis) in avatars

Closes #6527
Fixes #6522
// FREEBIE
This commit is contained in:
Mateo Hernandez 2017-04-14 23:20:46 -05:00 committed by Moxie Marlinspike
parent cd56f03e07
commit c389a9d3ce

View File

@ -42,7 +42,7 @@ public class GeneratedContactPhoto implements ContactPhoto {
if (cleanedName.isEmpty()) { if (cleanedName.isEmpty()) {
return "#"; return "#";
} else { } else {
return String.valueOf(cleanedName.charAt(0)); return new StringBuilder().appendCodePoint(cleanedName.codePointAt(0)).toString();
} }
} }