From 4aae212769aec024ab3097cc08f3eb1a7c022b78 Mon Sep 17 00:00:00 2001 From: db0 Date: Sat, 24 Jun 2023 15:18:04 +0200 Subject: [PATCH] inbox print --- fediseer/apis/v1/activitypub.py | 6 +++--- fediseer/routes.py | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fediseer/apis/v1/activitypub.py b/fediseer/apis/v1/activitypub.py index 8053235..b0a9214 100644 --- a/fediseer/apis/v1/activitypub.py +++ b/fediseer/apis/v1/activitypub.py @@ -44,7 +44,7 @@ class Inbox(Resource): raise e.NotFound("User does not exist") self.args = self.post_parser.parse_args() json_payload = request.get_json() - logger.info("aaa") - logger.warning(json_payload) - logger.info("inbox hit") + actor = json_payload["actor"] + message = json_payload["object"]["content"] + logger.info(f"Fediseer Inbox Received: From: {actor} | {message}") return {"message": "delivered"}, 200 diff --git a/fediseer/routes.py b/fediseer/routes.py index 6382a19..c6aade6 100644 --- a/fediseer/routes.py +++ b/fediseer/routes.py @@ -57,5 +57,7 @@ def wellknown_redirect(): def inbox(): # Access the JSON payload json_payload = request.get_json() - logger.info(json_payload) + actor = json_payload["actor"] + message = json_payload["object"]["content"] + logger.info(f"Shared Inbox Received: From: {actor} | {message}") return 'ok', 200