diff --git a/epicyon.py b/epicyon.py index 1873527b8..4ce4ba8b2 100644 --- a/epicyon.py +++ b/epicyon.py @@ -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, \ diff --git a/posts.py b/posts.py index a1819b93b..293a7c641 100644 --- a/posts.py +++ b/posts.py @@ -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, \ diff --git a/tests.py b/tests.py index b145f5f6f..d03ec1be2 100644 --- a/tests.py +++ b/tests.py @@ -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, \