forked from indymedia/epicyon
Required username
parent
1cd0a3670f
commit
8c590d7402
|
@ -86,8 +86,6 @@ if baseDir.endswith('/'):
|
||||||
federationList=[]
|
federationList=[]
|
||||||
if args.federationList:
|
if args.federationList:
|
||||||
federationList=args.federationList.copy()
|
federationList=args.federationList.copy()
|
||||||
print(baseDir)
|
|
||||||
sys.exit()
|
|
||||||
|
|
||||||
session = createSession(domain,port,useTor)
|
session = createSession(domain,port,useTor)
|
||||||
personCache={}
|
personCache={}
|
||||||
|
|
|
@ -69,7 +69,7 @@ def createPerson(baseDir: str,nickname: str,domain: str,port: int, \
|
||||||
'manuallyApprovesFollowers': False,
|
'manuallyApprovesFollowers': False,
|
||||||
'name': nickname,
|
'name': nickname,
|
||||||
'outbox': prefix+'://'+domain+'/users/'+nickname+'/outbox',
|
'outbox': prefix+'://'+domain+'/users/'+nickname+'/outbox',
|
||||||
'preferredNickname': ''+nickname,
|
'preferredUsername': ''+nickname,
|
||||||
'publicKey': {'id': prefix+'://'+domain+'/users/'+nickname+'/main-key',
|
'publicKey': {'id': prefix+'://'+domain+'/users/'+nickname+'/main-key',
|
||||||
'owner': prefix+'://'+domain+'/users/'+nickname,
|
'owner': prefix+'://'+domain+'/users/'+nickname,
|
||||||
'publicKeyPem': publicKeyPem,
|
'publicKeyPem': publicKeyPem,
|
||||||
|
@ -220,7 +220,7 @@ def setPreferredNickname(baseDir: str,nickname: str, domain: str, \
|
||||||
personJson=commentjson.load(fp)
|
personJson=commentjson.load(fp)
|
||||||
if not personJson:
|
if not personJson:
|
||||||
return False
|
return False
|
||||||
personJson['preferredNickname']=preferredName
|
personJson['preferredUsername']=preferredName
|
||||||
with open(filename, 'w') as fp:
|
with open(filename, 'w') as fp:
|
||||||
commentjson.dump(personJson, fp, indent=4, sort_keys=False)
|
commentjson.dump(personJson, fp, indent=4, sort_keys=False)
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in New Issue