projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-2
[akkoma]
/
lib
/
pleroma
/
notification.ex
diff --git
a/lib/pleroma/notification.ex
b/lib/pleroma/notification.ex
index d04a65a1e6c011828c41686d6ff87a027bbbd569..3ef3b3f58bf94f9752d806038b63e0c058896c20 100644
(file)
--- a/
lib/pleroma/notification.ex
+++ b/
lib/pleroma/notification.ex
@@
-1,5
+1,5
@@
# Pleroma: A lightweight social networking server
# Pleroma: A lightweight social networking server
-# Copyright © 2017-20
19
Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-20
20
Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Notification do
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Notification do
@@
-77,7
+77,6
@@
defmodule Pleroma.Notification do
|> exclude_notification_muted(user, exclude_notification_muted_opts)
|> exclude_blocked(user, exclude_blocked_opts)
|> exclude_visibility(opts)
|> exclude_notification_muted(user, exclude_notification_muted_opts)
|> exclude_blocked(user, exclude_blocked_opts)
|> exclude_visibility(opts)
- |> exclude_move(opts)
end
defp exclude_blocked(query, user, opts) do
end
defp exclude_blocked(query, user, opts) do
@@
-107,14
+106,6
@@
defmodule Pleroma.Notification do
|> where([n, a, o, tm], is_nil(tm.user_id))
end
|> where([n, a, o, tm], is_nil(tm.user_id))
end
- defp exclude_move(query, %{with_move: true}) do
- query
- end
-
- defp exclude_move(query, _opts) do
- where(query, [n, a], fragment("?->>'type' != 'Move'", a.data))
- end
-
@valid_visibilities ~w[direct unlisted public private]
defp exclude_visibility(query, %{exclude_visibilities: visibility})
@valid_visibilities ~w[direct unlisted public private]
defp exclude_visibility(query, %{exclude_visibilities: visibility})
@@
-294,7
+285,7
@@
defmodule Pleroma.Notification do
end
def create_notifications(%Activity{data: %{"type" => type}} = activity)
end
def create_notifications(%Activity{data: %{"type" => type}} = activity)
- when type in ["Like", "Announce", "Follow", "Move", "EmojiReact
ion
"] do
+ when type in ["Like", "Announce", "Follow", "Move", "EmojiReact"] do
notifications =
activity
|> get_notified_from_activity()
notifications =
activity
|> get_notified_from_activity()
@@
-322,7
+313,7
@@
defmodule Pleroma.Notification do
def get_notified_from_activity(activity, local_only \\ true)
def get_notified_from_activity(%Activity{data: %{"type" => type}} = activity, local_only)
def get_notified_from_activity(activity, local_only \\ true)
def get_notified_from_activity(%Activity{data: %{"type" => type}} = activity, local_only)
- when type in ["Create", "Like", "Announce", "Follow", "Move", "EmojiReact
ion
"] do
+ when type in ["Create", "Like", "Announce", "Follow", "Move", "EmojiReact"] do
[]
|> Utils.maybe_notify_to_recipients(activity)
|> Utils.maybe_notify_mentioned_recipients(activity)
[]
|> Utils.maybe_notify_to_recipients(activity)
|> Utils.maybe_notify_mentioned_recipients(activity)