projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix digest mix task on OTP releases
[akkoma]
/
lib
/
pleroma
/
web
/
push
/
impl.ex
diff --git
a/lib/pleroma/web/push/impl.ex
b/lib/pleroma/web/push/impl.ex
index f1740a6e0f2d48225c20b4f3e6922f69b1aba5be..6917257022ee2752c4679b79d3e7dcfb372b212b 100644
(file)
--- a/
lib/pleroma/web/push/impl.ex
+++ b/
lib/pleroma/web/push/impl.ex
@@
-55,11
+55,12
@@
defmodule Pleroma.Web.Push.Impl do
|> Jason.encode!()
|> push_message(build_sub(subscription), gcm_api_key, subscription)
end
|> Jason.encode!()
|> push_message(build_sub(subscription), gcm_api_key, subscription)
end
+ |> (&{:ok, &1}).()
end
def perform(_) do
Logger.warn("Unknown notification type")
end
def perform(_) do
Logger.warn("Unknown notification type")
- :error
+ {:error, :unknown_type}
end
@doc "Push message to web"
end
@doc "Push message to web"
@@
-105,14
+106,13
@@
defmodule Pleroma.Web.Push.Impl do
def build_content(
%{
def build_content(
%{
- activity: %{data: %{"directMessage" => true}},
user: %{notification_settings: %{privacy_option: true}}
user: %{notification_settings: %{privacy_option: true}}
- },
- actor,
+ }
= notification
,
+
_
actor,
_object,
_object,
-
_
mastodon_type
+ mastodon_type
) do
) do
- %{
title: "New Direct Message", body: "@#{actor.nickname}"
}
+ %{
body: format_title(notification, mastodon_type)
}
end
def build_content(notification, actor, object, mastodon_type) do
end
def build_content(notification, actor, object, mastodon_type) do