projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Twitter timelines for private instances
[akkoma]
/
lib
/
pleroma
/
notification.ex
diff --git
a/lib/pleroma/notification.ex
b/lib/pleroma/notification.ex
index 457cba9350244e748ffcb2454affbbc47631dab2..b5aadfd17eee840293be7fffeb0f326b01ec5bd8 100644
(file)
--- a/
lib/pleroma/notification.ex
+++ b/
lib/pleroma/notification.ex
@@
-1,3
+1,7
@@
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Pleroma.Notification do
use Ecto.Schema
alias Pleroma.{User, Activity, Notification, Repo, Object}
defmodule Pleroma.Notification do
use Ecto.Schema
alias Pleroma.{User, Activity, Notification, Repo, Object}
@@
-75,16
+79,11
@@
defmodule Pleroma.Notification do
end
end
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
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)
def dismiss(%{id: user_id} = _user, id) do
notification = Repo.get(Notification, id)