mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 21:26:57 +02:00
Registration support - Room Members: Use MXTools method to validate email address.
This commit is contained in:
@@ -705,8 +705,7 @@
|
||||
NSString *participantId = contact.displayName;
|
||||
|
||||
// Is it an email or a Matrix user ID?
|
||||
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"^\\S+@\\S+\\.\\S+$" options:NSRegularExpressionCaseInsensitive error:nil];
|
||||
BOOL isEmailAddress = (nil != [regex firstMatchInString:participantId options:0 range:NSMakeRange(0, participantId.length)]);
|
||||
BOOL isEmailAddress = [MXTools isEmailAddress:participantId];
|
||||
|
||||
// Sanity check the input
|
||||
if (!isEmailAddress &&
|
||||
|
||||
Reference in New Issue
Block a user