mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-24 03:43:42 -08:00
PeerTube: easier to just ignore anything from a accounts/peertube actor
This commit is contained in:
parent
7f2ed0b658
commit
3cd74ccc3b
1 changed files with 3 additions and 10 deletions
|
@ -412,17 +412,10 @@ def shared_inbox():
|
||||||
else:
|
else:
|
||||||
process_delete_request.delay(request_json, activity_log.id, ip_address())
|
process_delete_request.delay(request_json, activity_log.id, ip_address())
|
||||||
return ''
|
return ''
|
||||||
# Ignore PeerTube View activity
|
# Ignore unutilised PeerTube activity
|
||||||
if 'type' in request_json and request_json['type'] == 'View':
|
if 'actor' in request_json and request_json['actor'].endswith('accounts/peertube'):
|
||||||
activity_log.result = 'ignored'
|
activity_log.result = 'ignored'
|
||||||
activity_log.exception_message = 'PeerTube View activity'
|
activity_log.exception_message = 'PeerTube View or CacheFile activity'
|
||||||
db.session.add(activity_log)
|
|
||||||
db.session.commit()
|
|
||||||
return ''
|
|
||||||
# Ignore PeerTube CacheFile activity
|
|
||||||
if 'object' in request_json and 'type' in request_json['object'] and request_json['object']['type'] == 'CacheFile':
|
|
||||||
activity_log.result = 'ignored'
|
|
||||||
activity_log.exception_message = 'PeerTube CacheFile activity'
|
|
||||||
db.session.add(activity_log)
|
db.session.add(activity_log)
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
return ''
|
return ''
|
||||||
|
|
Loading…
Add table
Reference in a new issue