From 8defe2003fc6ed4d918b5374e77374de395c26ca Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@freedombone.net>
Date: Sat, 29 Jun 2019 11:41:22 +0100
Subject: [PATCH] Replies

---
 epicyon.py | 2 +-
 posts.py   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/epicyon.py b/epicyon.py
index 752162b1..9c62abad 100644
--- a/epicyon.py
+++ b/epicyon.py
@@ -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)
 
diff --git a/posts.py b/posts.py
index f888865f..8b3c5e04 100644
--- a/posts.py
+++ b/posts.py
@@ -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': {