From 4f2ac1b89fb7a2b53cca97aac81a84974a1c6a02 Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Fri, 5 Jan 2024 09:43:08 +1300 Subject: [PATCH] better logging of unfound objects when voting --- app/activitypub/routes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/activitypub/routes.py b/app/activitypub/routes.py index d81e17f1..1f65f15a 100644 --- a/app/activitypub/routes.py +++ b/app/activitypub/routes.py @@ -442,7 +442,7 @@ def process_inbox_request(request_json, activitypublog_id, ip_address): if user is None: activity_log.exception_message = 'Blocked or unfound user' elif liked is None: - activity_log.exception_message = 'Unfound object' + activity_log.exception_message = 'Unfound object ' + liked_ap_id elif user.is_local(): activity_log.exception_message = 'Activity about local content which is already present' activity_log.result = 'ignored' @@ -478,7 +478,7 @@ def process_inbox_request(request_json, activitypublog_id, ip_address): if user is None: activity_log.exception_message = 'Blocked or unfound user' elif disliked is None: - activity_log.exception_message = 'Unfound object' + activity_log.exception_message = 'Unfound object ' + liked_ap_id elif user.is_local(): activity_log.exception_message = 'Activity about local content which is already present' activity_log.result = 'ignored' @@ -701,7 +701,7 @@ def process_inbox_request(request_json, activitypublog_id, ip_address): if user is None: activity_log.exception_message = 'Blocked or unfound user' elif liked is None: - activity_log.exception_message = 'Unfound object' + activity_log.exception_message = 'Unfound object ' + request_json['object'] elif user.is_local(): activity_log.exception_message = 'Activity about local content which is already present' activity_log.result = 'ignored' @@ -736,7 +736,7 @@ def process_inbox_request(request_json, activitypublog_id, ip_address): if user is None: activity_log.exception_message = 'Blocked or unfound user' elif disliked is None: - activity_log.exception_message = 'Unfound object' + activity_log.exception_message = 'Unfound object' + target_ap_id elif user.is_local(): activity_log.exception_message = 'Activity about local content which is already present' activity_log.result = 'ignored'