Cyclical complexity
This commit is contained in:
parent
a291a6b8c0
commit
6a9d9da26f
@ -201,19 +201,15 @@ defmodule Pleroma.Web.Push.Impl do
|
|||||||
"New Direct Message"
|
"New Direct Message"
|
||||||
end
|
end
|
||||||
|
|
||||||
def format_title(%{type: type}) do
|
def format_title(%{type: "mention"}), do: "New Mention"
|
||||||
case type do
|
def format_title(%{type: "status"}), do: "New Status"
|
||||||
"mention" -> "New Mention"
|
def format_title(%{type: "follow"}), do: "New Follower"
|
||||||
"status" -> "New Status"
|
def format_title(%{type: "follow_request"}), do: "New Follow Request"
|
||||||
"follow" -> "New Follower"
|
def format_title(%{type: "reblog"}), do: "New Repeat"
|
||||||
"follow_request" -> "New Follow Request"
|
def format_title(%{type: "favourite"}), do: "New Favorite"
|
||||||
"reblog" -> "New Repeat"
|
def format_title(%{type: "update"}), do: "New Update"
|
||||||
"favourite" -> "New Favorite"
|
def format_title(%{type: "pleroma:chat_mention"}), do: "New Chat Message"
|
||||||
"update" -> "New Update"
|
def format_title(%{type: "pleroma:emoji_reaction"}), do: "New Reaction"
|
||||||
"pleroma:chat_mention" -> "New Chat Message"
|
def format_title(%{type: "poll"}), do: "Poll Results"
|
||||||
"pleroma:emoji_reaction" -> "New Reaction"
|
def format_title(%{type: type}), do: "New #{String.capitalize(type || "event")}"
|
||||||
"poll" -> "Poll Results"
|
|
||||||
type -> "New #{String.capitalize(type || "event")}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user