Merge remote-tracking branch 'origin/main'

This commit is contained in:
rimu 2025-01-22 10:51:33 +13:00
commit 91f17156b6

View file

@ -420,7 +420,6 @@ def shared_inbox():
object = request_json['object']
if not 'actor' in object:
missing_actor_in_announce_object = True
log_incoming_ap(id, APLOG_ANNOUNCE, APLOG_MONITOR, request_json, 'Actor is missing in Announce object')
if not 'id' in object or not 'type' in object or not 'object' in object:
if 'type' in object and (object['type'] == 'Page' or object['type'] == 'Note'):
log_incoming_ap(id, APLOG_ANNOUNCE, APLOG_IGNORED, saved_json, 'Intended for Mastodon')
@ -506,6 +505,7 @@ def shared_inbox():
if missing_actor_in_announce_object:
if ((request_json['object']['type'] == 'Create' or request_json['object']['type']) and
'attributedTo' in request_json['object']['object'] and isinstance(request_json['object']['object']['attributedTo'], str)):
log_incoming_ap(id, APLOG_ANNOUNCE, APLOG_MONITOR, request_json, 'nodebb: Actor is missing in the Create')
request_json['object']['actor'] = request_json['object']['object']['attributedTo']
if current_app.debug: