diff --git a/posts.py b/posts.py index db449807..93a7421a 100644 --- a/posts.py +++ b/posts.py @@ -206,3 +206,9 @@ def createPublicPost(username: str, domain: str, https: bool, content: str, foll } } return newPost + +def postToInbox(session,postJson,inboxUrl: str): + """Post a json message to the inbox of another person + """ + postResult = session.post(url = inboxUrl, data = postJson) + return postResult.text