Revert unneeded changes

This commit is contained in:
Maxim Filippov 2018-12-25 03:44:48 +03:00
commit ca2e9ce9cc
3 changed files with 3 additions and 14 deletions

View file

@ -75,16 +75,11 @@ defmodule Pleroma.Notification do
end
end
def clear(%User{} = user) do
def clear(user) do
from(n in Notification, where: n.user_id == ^user.id)
|> Repo.delete_all()
end
def clear(%Activity{} = activity) do
from(n in Notification, where: n.activity_id == ^activity.id)
|> Repo.delete_all()
end
def dismiss(%{id: user_id} = _user, id) do
notification = Repo.get(Notification, id)