X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fnotification.ex;h=51d59870ce25ed86d9b7aee2ba798e36abe12394;hb=90e157ef803296989b41d1fbfb5096b39320f75d;hp=301cfd1346d946f7ea0a370955531ae331f30873;hpb=922abcda61298a7bca48894cb9a51a52fdeab1ed;p=akkoma
diff --git a/lib/pleroma/notification.ex b/lib/pleroma/notification.ex
index 301cfd134..51d59870c 100644
--- a/lib/pleroma/notification.ex
+++ b/lib/pleroma/notification.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2018 Pleroma Authors
+# Copyright © 2017-2019 Pleroma Authors
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Notification do
@@ -80,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