Update development docs
[akkoma] / lib / pleroma / notification.ex
index 9e0ce0329e2638652eded2a150d4fc1087c9d013..2ab09495d0609b0ae091d38174a1eeca3eefdcb2 100644 (file)
@@ -341,6 +341,14 @@ defmodule Pleroma.Notification do
     |> Repo.delete_all()
   end
 
+  def destroy_multiple_from_types(%{id: user_id}, types) do
+    from(n in Notification,
+      where: n.user_id == ^user_id,
+      where: n.type in ^types
+    )
+    |> Repo.delete_all()
+  end
+
   def dismiss(%Pleroma.Activity{} = activity) do
     Notification
     |> where([n], n.activity_id == ^activity.id)