Merge branch 'main' into domain-block

This commit is contained in:
Mouse Reeve
2021-04-11 10:02:11 -07:00
57 changed files with 951 additions and 634 deletions

View File

@ -87,18 +87,11 @@ def is_blocked_activity(activity_json):
def activity_task(activity_json):
""" do something with this json we think is legit """
# lets see if the activitypub module can make sense of this json
try:
activity = activitypub.parse(activity_json)
except activitypub.ActivitySerializerError:
return
activity = activitypub.parse(activity_json)
# cool that worked, now we should do the action described by the type
# (create, update, delete, etc)
try:
activity.action()
except activitypub.ActivitySerializerError:
# this is raised if the activity is discarded
return
activity.action()
def has_valid_signature(request, activity):

View File

@ -168,7 +168,7 @@ class Curate(View):
suggestion.approved = True
suggestion.save()
else:
suggestion.delete()
suggestion.delete(broadcast=False)
return redirect("list-curate", book_list.id)