PeerTube: ignore incoming 'CacheFile' activity

This commit is contained in:
freamon 2024-05-26 02:24:11 +01:00
parent 1d9c176c7c
commit 21afa9a6aa

View file

@ -419,6 +419,14 @@ def shared_inbox():
db.session.add(activity_log) db.session.add(activity_log)
db.session.commit() db.session.commit()
return '' 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.commit()
return ''
else: else:
activity_log.activity_id = '' activity_log.activity_id = ''
if g.site.log_activitypub_json: if g.site.log_activitypub_json: