Deduplicate incoming create activities
This is a regression.
This commit is contained in:
@ -32,7 +32,6 @@ def inbox(request, username):
|
||||
@csrf_exempt
|
||||
def shared_inbox(request):
|
||||
''' incoming activitypub events '''
|
||||
# TODO: should this be functionally different from the non-shared inbox??
|
||||
if request.method == 'GET':
|
||||
return HttpResponseNotFound()
|
||||
|
||||
@ -217,6 +216,11 @@ def handle_create(activity):
|
||||
# we really oughtn't even be sending in this case
|
||||
return
|
||||
|
||||
# deduplicate incoming activities
|
||||
status_id = activity['object']['id']
|
||||
if models.Status.objects.filter(remote_id=status_id).count():
|
||||
return
|
||||
|
||||
status = status_builder.create_status(activity['object'])
|
||||
|
||||
# create a notification if this is a reply
|
||||
|
Reference in New Issue
Block a user