forked from indymedia/epicyon
Return single value
parent
ffa28e81f8
commit
d486fb1d31
|
@ -33,6 +33,10 @@ https=True
|
||||||
useTor=False
|
useTor=False
|
||||||
session = createSession(useTor)
|
session = createSession(useTor)
|
||||||
|
|
||||||
|
#asHeader = {'Accept': 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'}
|
||||||
|
#userFollowing = getJson(session,"",asHeader,None)
|
||||||
|
|
||||||
|
|
||||||
privateKeyPem,publicKeyPem,person,wfEndpoint=createPerson(username,domain,https,True)
|
privateKeyPem,publicKeyPem,person,wfEndpoint=createPerson(username,domain,https,True)
|
||||||
#deleteAllPosts(username,domain)
|
#deleteAllPosts(username,domain)
|
||||||
setPreferredUsername(username,domain,'badger')
|
setPreferredUsername(username,domain,'badger')
|
||||||
|
|
|
@ -164,16 +164,16 @@ def personOutboxJson(domain: str,path: str,https: bool,noOfItems: int) -> []:
|
||||||
"""Obtain the outbox feed for the given person
|
"""Obtain the outbox feed for the given person
|
||||||
"""
|
"""
|
||||||
if not path.endswith('/outbox'):
|
if not path.endswith('/outbox'):
|
||||||
return None,None
|
return None
|
||||||
username=None
|
username=None
|
||||||
if path.startswith('/users/'):
|
if path.startswith('/users/'):
|
||||||
username=path.replace('/users/','',1).replace('/outbox','')
|
username=path.replace('/users/','',1).replace('/outbox','')
|
||||||
if path.startswith('/@'):
|
if path.startswith('/@'):
|
||||||
username=path.replace('/@','',1).replace('/outbox','')
|
username=path.replace('/@','',1).replace('/outbox','')
|
||||||
if not username:
|
if not username:
|
||||||
return None,None
|
return None
|
||||||
if not validUsername(username):
|
if not validUsername(username):
|
||||||
return None,None
|
return None
|
||||||
startMessageId=None
|
startMessageId=None
|
||||||
return createOutbox(username,domain,https,noOfItems,startMessageId)
|
return createOutbox(username,domain,https,noOfItems,startMessageId)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue