mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 04:27:59 +01:00
19 lines
263 B
Elixir
19 lines
263 B
Elixir
defmodule PhilomenaWeb.CommentView do
|
|
use PhilomenaWeb, :view
|
|
|
|
def link_to_ip(ip) do
|
|
if ip do
|
|
ip
|
|
else
|
|
"N/A"
|
|
end
|
|
end
|
|
|
|
def link_to_fingerprint(fp) do
|
|
if fp do
|
|
fp |> String.slice(0..6)
|
|
else
|
|
"N/A"
|
|
end
|
|
end
|
|
end
|