Apply Hélène suggestions
This commit is contained in:
parent
e3e8ff06f9
commit
a4659d993d
|
@ -75,9 +75,7 @@ def puts_notification(activity, user) do
|
||||||
[head | _tail] ->
|
[head | _tail] ->
|
||||||
# "> " <> hd <> "..."
|
# "> " <> hd <> "..."
|
||||||
head
|
head
|
||||||
|> String.to_charlist()
|
|> String.slice(1, 80)
|
||||||
|> Enum.take(80)
|
|
||||||
|> List.to_string()
|
|
||||||
|> (fn x -> "> " <> x <> "..." end).()
|
|> (fn x -> "> " <> x <> "..." end).()
|
||||||
end
|
end
|
||||||
end).()
|
end).()
|
||||||
|
@ -136,7 +134,7 @@ def handle_command(%{user: user} = state, "t " <> activity_id) do
|
||||||
|> Enum.each(&puts_activity/1)
|
|> Enum.each(&puts_activity/1)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
_e -> IO.puts("An error occured when trying to show the thread...")
|
_e -> IO.puts("Could not show this thread...")
|
||||||
end
|
end
|
||||||
|
|
||||||
state
|
state
|
||||||
|
@ -144,7 +142,7 @@ def handle_command(%{user: user} = state, "t " <> activity_id) do
|
||||||
|
|
||||||
def handle_command(%{user: user} = state, "n read") do
|
def handle_command(%{user: user} = state, "n read") do
|
||||||
Pleroma.Notification.clear(user)
|
Pleroma.Notification.clear(user)
|
||||||
IO.puts("All notifications are marked as read")
|
IO.puts("All notifications were marked as read")
|
||||||
|
|
||||||
state
|
state
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue