master
Bob Mottram 2019-08-09 17:24:44 +01:00
parent 5ed5aa0d33
commit d8126b4ffa
3 changed files with 4 additions and 4 deletions

View File

@ -505,7 +505,7 @@ if args.message:
followersOnly=False
print('Sending post to '+args.sendto)
sendPostViaServer(session,args.nickname,args.password, \
sendPostViaServer(baseDir,session,args.nickname,args.password, \
domain,port, \
toNickname,toDomain,toPort,ccUrl, \
httpPrefix,sendMessage,followersOnly, \

View File

@ -860,7 +860,7 @@ def sendPost(session,baseDir: str,nickname: str, domain: str, port: int, \
thr.start()
return 0
def sendPostViaServer(session,fromNickname: str,password: str, \
def sendPostViaServer(baseDir,session,fromNickname: str,password: str, \
fromDomain: str, fromPort: int, \
toNickname: str, toDomain: str, toPort: int, cc: str, \
httpPrefix: str, content: str, followersOnly: bool, \
@ -923,7 +923,7 @@ def sendPostViaServer(session,fromNickname: str,password: str, \
toDomainFull=toDomain+':'+str(toPort)
toPersonId=httpPrefix+'://'+toDomainFull+'/users/'+toNickname
postJsonObject = \
createPostBase(None, \
createPostBase(baseDir, \
fromNickname,fromDomain,fromPort, \
toPersonId,cc,httpPrefix,content, \
followersOnly,saveToFile,clientToServer, \

View File

@ -1117,7 +1117,7 @@ def testClientToServer():
assert len([name for name in os.listdir(outboxPath) if os.path.isfile(os.path.join(outboxPath, name))])==0
assert len([name for name in os.listdir(inboxPath) if os.path.isfile(os.path.join(inboxPath, name))])==0
sendResult= \
sendPostViaServer(sessionAlice,'alice',password, \
sendPostViaServer(aliceDir,sessionAlice,'alice',password, \
aliceDomain,alicePort, \
'bob',bobDomain,bobPort,None, \
httpPrefix,'Sent from my ActivityPub client',followersOnly, \