projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'fix/mix-task-user-delete_activities' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
push
/
impl.ex
diff --git
a/lib/pleroma/web/push/impl.ex
b/lib/pleroma/web/push/impl.ex
index da535aa68bf93f0fd3e1edcc8335ad657c4059af..82152dffa1f324adb839ba36fe4443e8a65dd487 100644
(file)
--- a/
lib/pleroma/web/push/impl.ex
+++ b/
lib/pleroma/web/push/impl.ex
@@
-16,7
+16,7
@@
defmodule Pleroma.Web.Push.Impl do
require Logger
import Ecto.Query
require Logger
import Ecto.Query
- @types ["Create", "Follow", "Announce", "Like", "Move"]
+ @types ["Create", "Follow", "Announce", "Like", "Move"
, "EmojiReact"
]
@doc "Performs sending notifications for user subscriptions"
@spec perform(Notification.t()) :: list(any) | :error | {:error, :unknown_type}
@doc "Performs sending notifications for user subscriptions"
@spec perform(Notification.t()) :: list(any) | :error | {:error, :unknown_type}
@@
-149,6
+149,15
@@
defmodule Pleroma.Web.Push.Impl do
"@#{actor.nickname} repeated: #{Utils.scrub_html_and_truncate(content, 80)}"
end
"@#{actor.nickname} repeated: #{Utils.scrub_html_and_truncate(content, 80)}"
end
+ def format_body(
+ %{activity: %{data: %{"type" => "EmojiReact", "content" => content}}},
+ actor,
+ _object,
+ _mastodon_type
+ ) do
+ "@#{actor.nickname} reacted with #{content}"
+ end
+
def format_body(
%{activity: %{data: %{"type" => type}}} = notification,
actor,
def format_body(
%{activity: %{data: %{"type" => type}}} = notification,
actor,
@@
-179,6
+188,7
@@
defmodule Pleroma.Web.Push.Impl do
"reblog" -> "New Repeat"
"favourite" -> "New Favorite"
"pleroma:chat_mention" -> "New Chat Message"
"reblog" -> "New Repeat"
"favourite" -> "New Favorite"
"pleroma:chat_mention" -> "New Chat Message"
+ "pleroma:emoji_reaction" -> "New Reaction"
type -> "New #{String.capitalize(type || "event")}"
end
end
type -> "New #{String.capitalize(type || "event")}"
end
end