mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
sometimes ap_id is a dict?!
This commit is contained in:
parent
69cef6edac
commit
6a9ba43936
1 changed files with 2 additions and 0 deletions
|
@ -1610,6 +1610,8 @@ def process_new_content(user, community, store_ap_json, request_json, announced=
|
||||||
def process_upvote(user, store_ap_json, request_json, announced=True):
|
def process_upvote(user, store_ap_json, request_json, announced=True):
|
||||||
id = request_json['id']
|
id = request_json['id']
|
||||||
ap_id = request_json['object'] if not announced else request_json['object']['object']
|
ap_id = request_json['object'] if not announced else request_json['object']['object']
|
||||||
|
if isinstance(ap_id, dict) and 'id' in ap_id:
|
||||||
|
ap_id = ap_id['id']
|
||||||
liked = find_liked_object(ap_id)
|
liked = find_liked_object(ap_id)
|
||||||
if liked is None:
|
if liked is None:
|
||||||
log_incoming_ap(id, APLOG_LIKE, APLOG_FAILURE, request_json if store_ap_json else None, 'Unfound object ' + ap_id)
|
log_incoming_ap(id, APLOG_LIKE, APLOG_FAILURE, request_json if store_ap_json else None, 'Unfound object ' + ap_id)
|
||||||
|
|
Loading…
Add table
Reference in a new issue