mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
Always store request JSON if activity was unmatched, but use site setting for unfound/blocked Announce object actor
This commit is contained in:
parent
6b526635ca
commit
958a0c9f0c
1 changed files with 2 additions and 2 deletions
|
@ -1030,7 +1030,7 @@ def process_inbox_request(request_json, store_ap_json):
|
||||||
user_ap_id = request_json['object']['actor']
|
user_ap_id = request_json['object']['actor']
|
||||||
user = find_actor_or_create(user_ap_id)
|
user = find_actor_or_create(user_ap_id)
|
||||||
if not user or not isinstance(user, User):
|
if not user or not isinstance(user, User):
|
||||||
log_incoming_ap(id, APLOG_ANNOUNCE, APLOG_FAILURE, request_json, 'Blocked or unfound user for Announce object actor ' + user_ap_id)
|
log_incoming_ap(id, APLOG_ANNOUNCE, APLOG_FAILURE, request_json if store_ap_json else None, 'Blocked or unfound user for Announce object actor ' + user_ap_id)
|
||||||
return
|
return
|
||||||
|
|
||||||
user.last_seen = site.last_active = utcnow()
|
user.last_seen = site.last_active = utcnow()
|
||||||
|
@ -1246,7 +1246,7 @@ def process_inbox_request(request_json, store_ap_json):
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
log_incoming_ap(id, APLOG_MONITOR, APLOG_PROCESSING, request_json if store_ap_json else None, 'Unmatched activity')
|
log_incoming_ap(id, APLOG_MONITOR, APLOG_PROCESSING, request_json, 'Unmatched activity')
|
||||||
|
|
||||||
|
|
||||||
@celery.task
|
@celery.task
|
||||||
|
|
Loading…
Add table
Reference in a new issue