From 9c2859b616c3225a192da923dde023095eb63756 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 28 Jun 2019 20:28:36 +0100 Subject: [PATCH] Posting to inbox --- posts.py | 6 ++++++ 1 file changed, 6 insertions(+) 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