mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 19:36:56 -08:00
ignore unfound objects when voting
This commit is contained in:
parent
7d2b6b8f6a
commit
80ad21deeb
1 changed files with 8 additions and 0 deletions
|
@ -431,6 +431,8 @@ 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'
|
||||
elif user.is_local():
|
||||
activity_log.exception_message = 'Activity about local content which is already present'
|
||||
activity_log.result = 'ignored'
|
||||
|
@ -465,6 +467,8 @@ def process_inbox_request(request_json, activitypublog_id, ip_address):
|
|||
disliked = find_liked_object(liked_ap_id)
|
||||
if user is None:
|
||||
activity_log.exception_message = 'Blocked or unfound user'
|
||||
elif disliked is None:
|
||||
activity_log.exception_message = 'Unfound object'
|
||||
elif user.is_local():
|
||||
activity_log.exception_message = 'Activity about local content which is already present'
|
||||
activity_log.result = 'ignored'
|
||||
|
@ -641,6 +645,8 @@ def process_inbox_request(request_json, activitypublog_id, ip_address):
|
|||
liked = find_liked_object(request_json['object'])
|
||||
if user is None:
|
||||
activity_log.exception_message = 'Blocked or unfound user'
|
||||
elif liked is None:
|
||||
activity_log.exception_message = 'Unfound object'
|
||||
elif user.is_local():
|
||||
activity_log.exception_message = 'Activity about local content which is already present'
|
||||
activity_log.result = 'ignored'
|
||||
|
@ -674,6 +680,8 @@ def process_inbox_request(request_json, activitypublog_id, ip_address):
|
|||
disliked = find_liked_object(target_ap_id)
|
||||
if user is None:
|
||||
activity_log.exception_message = 'Blocked or unfound user'
|
||||
elif disliked is None:
|
||||
activity_log.exception_message = 'Unfound object'
|
||||
elif user.is_local():
|
||||
activity_log.exception_message = 'Activity about local content which is already present'
|
||||
activity_log.result = 'ignored'
|
||||
|
|
Loading…
Add table
Reference in a new issue