|  |  | @ -385,10 +385,16 @@ public class OWSLinkPreview: MTLModel { | 
			
		
	
		
		
			
				
					
					|  |  |  |         var urlMatches: [URLMatchResult] = [] |  |  |  |         var urlMatches: [URLMatchResult] = [] | 
			
		
	
		
		
			
				
					
					|  |  |  |         let matches = detector.matches(in: body, options: [], range: NSRange(location: 0, length: body.count)) |  |  |  |         let matches = detector.matches(in: body, options: [], range: NSRange(location: 0, length: body.count)) | 
			
		
	
		
		
			
				
					
					|  |  |  |         for match in matches { |  |  |  |         for match in matches { | 
			
		
	
		
		
			
				
					
					|  |  |  |             guard let matchURL = match.url else { |  |  |  |             guard let matchURL = match.url else { continue } | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |                 continue |  |  |  |              | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             } |  |  |  |             // If the URL entered didn't have a scheme it will default to 'http', we want to catch this and | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |  |             let urlString = matchURL.absoluteString |  |  |  |             // set the scheme to 'https' instead as we don't load previews for 'http' so this will result | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             // in more previews actually getting loaded without forcing the user to enter 'https://' before | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             // every URL they enter | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             let urlString: String = (matchURL.absoluteString == "http://\(body)" ? | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 "https://\(body)" : | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |                 matchURL.absoluteString | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |             ) | 
			
		
	
		
		
			
				
					
					|  |  |  |             if isValidLinkUrl(urlString) { |  |  |  |             if isValidLinkUrl(urlString) { | 
			
		
	
		
		
			
				
					
					|  |  |  |                 let matchResult = URLMatchResult(urlString: urlString, matchRange: match.range) |  |  |  |                 let matchResult = URLMatchResult(urlString: urlString, matchRange: match.range) | 
			
		
	
		
		
			
				
					
					|  |  |  |                 urlMatches.append(matchResult) |  |  |  |                 urlMatches.append(matchResult) | 
			
		
	
	
		
		
			
				
					|  |  | 
 |