Trim whitespace from open group URLs entered by user.

pull/1984/head
Ian Macdonald 3 years ago
parent ec3e31d211
commit f72ccea6b6
No known key found for this signature in database
GPG Key ID: AE4C20556BA626FA

@ -18,7 +18,7 @@ import { getOpenGroupManager } from './OpenGroupManagerV2';
// 143.198.213.255:80/main?public_key=658d29b91892a2389505596b135e76a53db6e11d613a51dbd3d0816adffb231c
export function parseOpenGroupV2(urlWithPubkey: string): OpenGroupV2Room | undefined {
const lowerCased = urlWithPubkey.toLowerCase();
const lowerCased = urlWithPubkey.trim().toLowerCase();
try {
if (!openGroupV2CompleteURLRegex.test(lowerCased)) {
throw new Error('regex fail');

Loading…
Cancel
Save