diff --git a/app/main.py b/app/main.py index b6491dc..377f026 100644 --- a/app/main.py +++ b/app/main.py @@ -75,17 +75,18 @@ async def outbox( db_session: AsyncSession = Depends(get_db_session), ) -> Response: payload = await request.body() - logger.info(payload) + content = payload.decode("utf-8") + logger.info(content) + post_token = request.headers.get("Authorization") if POST_TOKEN is not None \ - and POST_TOKEN == request.headers.get("post_token"): + and POST_TOKEN == post_token.split(" ")[1]: # type: ignore logger.info("True token") from app.activitypub import VisibilityEnum from app.boxes import _send_create from app.orgpython import to_html - content = payload.decode("utf-8") content = to_html(content).replace("\n", "") await _send_create(