projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add initial Nodeinfo document
[akkoma]
/
lib
/
pleroma
/
web
/
push
/
impl.ex
diff --git
a/lib/pleroma/web/push/impl.ex
b/lib/pleroma/web/push/impl.ex
index 83cbdc870bc877f9b68f65d6db472ba7a332fda0..28e13ef9c791cbfe16e4737099572cfa898cd786 100644
(file)
--- a/
lib/pleroma/web/push/impl.ex
+++ b/
lib/pleroma/web/push/impl.ex
@@
-124,8
+124,8
@@
defmodule Pleroma.Web.Push.Impl do
def format_body(activity, actor, object, mastodon_type \\ nil)
def format_body(activity, actor, object, mastodon_type \\ nil)
- def format_body(_activity, actor, %{data: %{"type" => "ChatMessage"
, "content" => content}
}, _) do
- case
content
do
+ def format_body(_activity, actor, %{data: %{"type" => "ChatMessage"
} = data
}, _) do
+ case
data["content"]
do
nil -> "@#{actor.nickname}: (Attachment)"
content -> "@#{actor.nickname}: #{Utils.scrub_html_and_truncate(content, 80)}"
end
nil -> "@#{actor.nickname}: (Attachment)"
content -> "@#{actor.nickname}: #{Utils.scrub_html_and_truncate(content, 80)}"
end