Snake case

main
Bob Mottram 2021-12-25 21:42:26 +00:00
parent 8a0855af4c
commit 3100bce6c3
2 changed files with 12 additions and 10 deletions

View File

@ -1705,7 +1705,7 @@ class PubServer(BaseHTTPRequestHandler):
if not registerAccount(base_dir, http_prefix, domain, port,
loginNickname, loginPassword,
self.server.manualFollowerApproval):
self.server.manual_follower_approval):
self.server.POSTbusy = False
if callingDomain.endswith('.onion') and onion_domain:
self._redirect_headers('http://' + onion_domain +
@ -18483,7 +18483,7 @@ def runDaemon(content_license_url: str,
debug: bool = False, unit_test: bool = False,
instance_only_skills_search: bool = False,
send_threads: [] = [],
manualFollowerApproval: bool = True) -> None:
manual_follower_approval: bool = True) -> None:
if len(domain) == 0:
domain = 'localhost'
if '.' not in domain:
@ -18615,7 +18615,7 @@ def runDaemon(content_license_url: str,
httpd.blocklistUpdateInterval = 100
httpd.domainBlocklist = getDomainBlocklist(base_dir)
httpd.manualFollowerApproval = manualFollowerApproval
httpd.manual_follower_approval = manual_follower_approval
httpd.onion_domain = onion_domain
httpd.i2p_domain = i2p_domain
httpd.media_instance = media_instance

View File

@ -350,7 +350,7 @@ def getDefaultPersonContext() -> str:
def _createPersonBase(base_dir: str, nickname: str, domain: str, port: int,
http_prefix: str, saveToFile: bool,
manualFollowerApproval: bool,
manual_follower_approval: bool,
groupAccount: bool,
password: str) -> (str, str, {}, {}):
"""Returns the private key, public key, actor and webfinger endpoint
@ -372,7 +372,7 @@ def _createPersonBase(base_dir: str, nickname: str, domain: str, port: int,
if groupAccount:
personType = 'Group'
# Enable follower approval by default
approveFollowers = manualFollowerApproval
approveFollowers = manual_follower_approval
personName = nickname
personId = localActorUrl(http_prefix, nickname, domain)
inboxStr = personId + '/inbox'
@ -541,7 +541,7 @@ def _createPersonBase(base_dir: str, nickname: str, domain: str, port: int,
def registerAccount(base_dir: str, http_prefix: str, domain: str, port: int,
nickname: str, password: str,
manualFollowerApproval: bool) -> bool:
manual_follower_approval: bool) -> bool:
"""Registers a new account from the web interface
"""
if _accountExists(base_dir, nickname, domain):
@ -556,7 +556,7 @@ def registerAccount(base_dir: str, http_prefix: str, domain: str, port: int,
newPerson, webfingerEndpoint) = createPerson(base_dir, nickname,
domain, port,
http_prefix, True,
manualFollowerApproval,
manual_follower_approval,
password)
if privateKeyPem:
return True
@ -593,7 +593,7 @@ def savePersonQrcode(base_dir: str,
def createPerson(base_dir: str, nickname: str, domain: str, port: int,
http_prefix: str, saveToFile: bool,
manualFollowerApproval: bool,
manual_follower_approval: bool,
password: str,
groupAccount: bool = False) -> (str, str, {}, {}):
"""Returns the private key, public key, actor and webfinger endpoint
@ -615,12 +615,14 @@ def createPerson(base_dir: str, nickname: str, domain: str, port: int,
# news account already exists
return None, None, None, None
manual_follower = manual_follower_approval
(privateKeyPem, publicKeyPem,
newPerson, webfingerEndpoint) = _createPersonBase(base_dir, nickname,
domain, port,
http_prefix,
saveToFile,
manualFollowerApproval,
manual_follower,
groupAccount,
password)
if not getConfigParam(base_dir, 'admin'):
@ -637,7 +639,7 @@ def createPerson(base_dir: str, nickname: str, domain: str, port: int,
if not os.path.isdir(accountDir):
os.mkdir(accountDir)
if manualFollowerApproval:
if manual_follower_approval:
followDMsFilename = acctDir(base_dir, nickname, domain) + '/.followDMs'
try:
with open(followDMsFilename, 'w+') as fFile: