Return single value

master
Bob Mottram 2019-06-29 16:18:35 +01:00
parent ffa28e81f8
commit d486fb1d31
2 changed files with 7 additions and 3 deletions

View File

@ -33,6 +33,10 @@ https=True
useTor=False
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)
#deleteAllPosts(username,domain)
setPreferredUsername(username,domain,'badger')

View File

@ -164,16 +164,16 @@ def personOutboxJson(domain: str,path: str,https: bool,noOfItems: int) -> []:
"""Obtain the outbox feed for the given person
"""
if not path.endswith('/outbox'):
return None,None
return None
username=None
if path.startswith('/users/'):
username=path.replace('/users/','',1).replace('/outbox','')
if path.startswith('/@'):
username=path.replace('/@','',1).replace('/outbox','')
if not username:
return None,None
return None
if not validUsername(username):
return None,None
return None
startMessageId=None
return createOutbox(username,domain,https,noOfItems,startMessageId)