minor fix for conf integraion in utils

This commit is contained in:
doctor_dev 2025-05-30 19:40:25 +00:00
parent abb3f97a91
commit c98f67fbf3
No known key found for this signature in database
GPG key ID: F12F7F71CB84AEAA

View file

@ -60,7 +60,7 @@ def IsXFTPServerValid(url: str) -> bool:
Returns True if URL is a valid SimpleX XFTP Server URL
False otherwise
"""
return conf.RecognizeSimplexType(url) == 'xftp'
return RecognizeSimplexType(url) == 'xftp'
# stub function
def IsSMPServerValid(url: str) -> bool:
@ -68,7 +68,7 @@ def IsSMPServerValid(url: str) -> bool:
Returns True if URL is a valid SimpleX SMP Server URL
False otherwise
"""
return conf.RecognizeSimplexType(url) == 'smp'
return RecognizeSimplexType(url) == 'smp'
def IsClearnetLinkValid(url: str) -> bool:
"""
@ -242,7 +242,7 @@ def IsNameValid(name: str) -> bool:
Check the parameter name only contains [a-zA-Z0-9] and is 64 chars long.
"""
try:
return bool(VALID_NAME_PATTERN.fullmatch(name.strip()))
return bool(conf.VALID_NAME_PATTERN.fullmatch(name.strip()))
except Exception:
return False