HOTFIX: fix normalizing room names on Android

"normalize" will raise an exception, probably because the JSC build is not
full-ICU enabled.
This commit is contained in:
Saúl Ibarra Corretgé 2019-11-05 12:12:17 +01:00
parent b1a8a014fb
commit f4626b164e
1 changed files with 6 additions and 2 deletions

View File

@ -120,8 +120,12 @@ export function getBackendSafeRoomName(room: ?string): ?string {
// But in this case we're fine goin on...
}
// Normalize the character set
room = room.normalize('NFKC');
try {
// Normalize the character set
room = room.normalize('NFKC');
} catch (e) {
// Android's JSC does not seem to be a full-ICU build so this will raise an exception.
}
// Only decoded and normalized strings can be lowercased properly.
room = room.toLowerCase();