master
Bob Mottram 2019-06-29 11:41:22 +01:00
parent c64ee34355
commit 8defe2003f
2 changed files with 4 additions and 4 deletions

View File

@ -33,7 +33,7 @@ session = createSession(useTor)
privateKeyPem,publicKeyPem,person,wfEndpoint=createPerson(username,domain,https,True)
setPreferredUsername(username,domain,'badger')
setBio(username,domain,'Some personal info')
createPublicPost(username, domain, https, "G'day world!", False, True, 'Not suitable for Vogons')
createPublicPost(username, domain, https, "G'day world!", False, True, None, None, 'Not suitable for Vogons')
#runDaemon(domain,port,federationList,useTor)

View File

@ -167,7 +167,7 @@ def createOutboxDir(username: str,domain: str) -> (str,str):
outboxJsonFilename=baseDir+'/accounts/'+handle+'/outbox.json'
return outboxJsonFilename,outboxDir
def createPublicPost(username: str, domain: str, https: bool, content: str, followersOnly: bool, saveToFile: bool, subject=None) -> {}:
def createPublicPost(username: str, domain: str, https: bool, content: str, followersOnly: bool, saveToFile: bool, inReplyTo=None, inReplyToAtomUri=None, subject=None) -> {}:
"""Creates a post
"""
prefix='https'
@ -200,7 +200,7 @@ def createPublicPost(username: str, domain: str, https: bool, content: str, foll
'object': {'id': newPostId,
'type': 'Note',
'summary': summary,
'inReplyTo': None,
'inReplyTo': inReplyTo,
'published': published,
'url': prefix+'://'+domain+'/@'+username+'/'+statusNumber,
'attributedTo': prefix+'://'+domain+'/users/'+username,
@ -208,7 +208,7 @@ def createPublicPost(username: str, domain: str, https: bool, content: str, foll
'cc': [prefix+'://'+domain+'/users/'+username+'/followers'],
'sensitive': sensitive,
'atomUri': prefix+'://'+domain+'/users/'+username+'/statuses/'+statusNumber,
'inReplyToAtomUri': None,
'inReplyToAtomUri': inReplyToAtomUri,
'conversation': 'tag:'+domain+','+conversationDate+':objectId='+conversationId+':objectType=Conversation',
'content': content,
'contentMap': {