diff --git a/NextcloudTalk/RoomInfoTableViewController.m b/NextcloudTalk/RoomInfoTableViewController.m index f6c7b0a31..763faf80e 100644 --- a/NextcloudTalk/RoomInfoTableViewController.m +++ b/NextcloudTalk/RoomInfoTableViewController.m @@ -134,6 +134,10 @@ @interface RoomInfoTableViewController () textField.text.length) { return NO; } + // Set maximum character length NSUInteger newLength = [textField.text length] + [string length] - range.length; - BOOL hasAllowedLength = newLength <= 200; - // Enable/Disable password confirmation button - if (hasAllowedLength) { + + NSUInteger allowedLength = 200; + + if (textField == _banInternalNoteTextField) { + allowedLength = 4000; + } + + BOOL hasAllowedLength = newLength <= allowedLength; + + // An internal note on banning is optional, so only enable/disable password confirmation button + if (hasAllowedLength && textField == _setPasswordTextField) { NSString *newValue = [[textField.text stringByReplacingCharactersInRange:range withString:string] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]; _setPasswordAction.enabled = (newValue.length > 0); } + return hasAllowedLength; }