mirror of
				https://github.com/cinnyapp/cinny.git
				synced 2025-11-03 22:10:29 +03:00 
			
		
		
		
	Fix incorrectly parsed mxid (#2452)
This commit is contained in:
		
							parent
							
								
									abd713d693
								
							
						
					
					
						commit
						789da641c1
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -23,7 +23,7 @@ const DOMAIN_REGEX = /\b(?:[a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}\b/;
 | 
			
		|||
 | 
			
		||||
export const isServerName = (serverName: string): boolean => DOMAIN_REGEX.test(serverName);
 | 
			
		||||
 | 
			
		||||
const matchMxId = (id: string): RegExpMatchArray | null => id.match(/^([@$+#])(.+):(\S+)$/);
 | 
			
		||||
const matchMxId = (id: string): RegExpMatchArray | null => id.match(/^([@$+#])([^\s:]+):(\S+)$/);
 | 
			
		||||
 | 
			
		||||
const validMxId = (id: string): boolean => !!matchMxId(id);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue