mirror of https://gitlab.com/bashrc2/epicyon
Load shared items federation tokens from file
parent
ceaefc6ee9
commit
2cfd87d802
|
@ -15072,7 +15072,15 @@ def runDaemon(sharedItemsFederatedDomains: [],
|
|||
httpd.httpPrefix = httpPrefix
|
||||
httpd.debug = debug
|
||||
httpd.federationList = fedList.copy()
|
||||
if not sharedItemsFederatedDomains:
|
||||
sharedItemsTokensFilename = \
|
||||
baseDir + '/accounts/sharedItemsFederationTokens.json'
|
||||
if os.path.isfile(sharedItemsTokensFilename):
|
||||
sharedItemsFederatedDomains = loadJson(sharedItemsTokensFilename)
|
||||
httpd.sharedItemsFederatedDomains = sharedItemsFederatedDomains.copy()
|
||||
if httpd.sharedItemsFederatedDomains:
|
||||
if domain not in httpd.sharedItemsFederatedDomains:
|
||||
httpd.sharedItemsFederatedDomains.append(domain)
|
||||
httpd.baseDir = baseDir
|
||||
httpd.instanceId = instanceId
|
||||
httpd.personCache = {}
|
||||
|
|
27
epicyon.py
27
epicyon.py
|
@ -1028,16 +1028,6 @@ else:
|
|||
if configFederationList:
|
||||
federationList = configFederationList
|
||||
|
||||
sharedItemsFederatedDomains = []
|
||||
if args.sharedItemsFederatedDomains:
|
||||
setConfigParam(baseDir, 'sharedItemsFederatedDomains',
|
||||
sharedItemsFederatedDomains)
|
||||
else:
|
||||
configSharedItemsFederatedDomains = \
|
||||
getConfigParam(baseDir, 'sharedItemsFederatedDomains')
|
||||
if configSharedItemsFederatedDomains:
|
||||
sharedItemsFederatedDomains = configSharedItemsFederatedDomains
|
||||
|
||||
proxyType = None
|
||||
if args.tor or domain.endswith('.onion'):
|
||||
proxyType = 'tor'
|
||||
|
@ -2156,9 +2146,22 @@ if args.desktop:
|
|||
|
||||
if federationList:
|
||||
print('Federating with: ' + str(federationList))
|
||||
if sharedItemsFederatedDomains:
|
||||
if args.sharedItemsFederatedDomains:
|
||||
print('Federating shared items with: ' +
|
||||
str(sharedItemsFederatedDomains))
|
||||
args.sharedItemsFederatedDomains)
|
||||
|
||||
sharedItemsFederatedDomains = []
|
||||
if args.sharedItemsFederatedDomains:
|
||||
sharedItemsFederatedDomainsStr = args.sharedItemsFederatedDomains
|
||||
setConfigParam(baseDir, 'sharedItemsFederatedDomains',
|
||||
sharedItemsFederatedDomainsStr)
|
||||
else:
|
||||
sharedItemsFederatedDomainsStr = \
|
||||
getConfigParam(baseDir, 'sharedItemsFederatedDomains')
|
||||
if sharedItemsFederatedDomainsStr:
|
||||
sharedItemsFederatedDomainsList = sharedItemsFederatedDomainsStr.split(',')
|
||||
for sharedFederatedDomain in sharedItemsFederatedDomainsList:
|
||||
sharedItemsFederatedDomains.append(sharedFederatedDomain.strip())
|
||||
|
||||
if args.block:
|
||||
if not nickname:
|
||||
|
|
Loading…
Reference in New Issue