Don't broadcast curation rejects

This commit is contained in:
Mouse Reeve 2021-04-10 18:15:13 -07:00
parent fea298a1de
commit 98ff66cd16
2 changed files with 3 additions and 3 deletions

View file

@ -386,11 +386,11 @@ class CollectionItemMixin(ActivitypubMixin):
activity = self.to_add_activity(self.user) activity = self.to_add_activity(self.user)
self.broadcast(activity, self.user) self.broadcast(activity, self.user)
def delete(self, *args, **kwargs): def delete(self, *args, broadcast=True, **kwargs):
""" broadcast a remove activity """ """ broadcast a remove activity """
activity = self.to_remove_activity(self.user) activity = self.to_remove_activity(self.user)
super().delete(*args, **kwargs) super().delete(*args, **kwargs)
if self.user.local: if self.user.local and broadcast:
self.broadcast(activity, self.user) self.broadcast(activity, self.user)
def to_add_activity(self, user): def to_add_activity(self, user):

View file

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