Don't broadcast curation rejects
This commit is contained in:
parent
fea298a1de
commit
98ff66cd16
|
@ -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):
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue