diff options
author | Alex Gleason <alex@alexgleason.me> | 2021-12-07 13:41:54 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2021-12-07 13:41:54 -0500 |
commit | 2c96668a2c20906e5159fdea9326dbba4ca6ca62 (patch) | |
tree | e7fc1def45d51ba8011c1cfacb28c2523279e09b /lib/pleroma/web/push/impl.ex | |
parent | 335684182a094c10fb9f72e3865fd1b9606484a4 (diff) | |
parent | b57041c59a14df78b4a461e68911a9edc788bc0a (diff) | |
download | pleroma-2c96668a2c20906e5159fdea9326dbba4ca6ca62.tar.gz |
Merge remote-tracking branch 'origin/develop' into fix-attachment-dimensions
Diffstat (limited to 'lib/pleroma/web/push/impl.ex')
-rw-r--r-- | lib/pleroma/web/push/impl.ex | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/push/impl.ex b/lib/pleroma/web/push/impl.ex index 83cbdc870..28e13ef9c 100644 --- 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, %{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 |