X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fnotification.ex;h=51d59870ce25ed86d9b7aee2ba798e36abe12394;hb=980b5288ed119a3579afe632dff3391528ff399c;hp=47f6b6ee73a5d9c5b9e5c9e43868e01d3c65f190;hpb=91236c60c7aa266c1e874ebdd2aa44becfc6709b;p=akkoma diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex index 47f6b6ee7..51d59870c 100644 --- a/lib/pleroma/notification.ex +++ b/lib/pleroma/notification.ex @@ -1,3 +1,7 @@ +# Pleroma: A lightweight social networking server +# Copyright © 2017-2019 Pleroma Authors +# SPDX-License-Identifier: AGPL-3.0-only + defmodule Pleroma.Notification do use Ecto.Schema alias Pleroma.{User, Activity, Notification, Repo, Object} @@ -76,9 +80,8 @@ defmodule Pleroma.Notification do end def clear(user) do - query = from(n in Notification, where: n.user_id == ^user.id) - - Repo.delete_all(query) + from(n in Notification, where: n.user_id == ^user.id) + |> Repo.delete_all() end def dismiss(%{id: user_id} = _user, id) do