aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/twitter_api/views
diff options
context:
space:
mode:
authorThog <thog92@hotmail.fr>2017-11-19 02:22:07 +0100
committerThog <thog92@hotmail.fr>2017-11-19 02:22:07 +0100
commit59770c3f5c9a038dbde6b2e1cd1551a7b8f1672b (patch)
tree178c9f13d02a3a168e1755f8dcbcde0d429315f4 /lib/pleroma/web/twitter_api/views
parented3403ad8be255480d7e41f899d74fe9e5ef3f84 (diff)
downloadpleroma-59770c3f5c9a038dbde6b2e1cd1551a7b8f1672b.tar.gz
Fix all compilation warnings
Diffstat (limited to 'lib/pleroma/web/twitter_api/views')
-rw-r--r--lib/pleroma/web/twitter_api/views/user_view.ex6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pleroma/web/twitter_api/views/user_view.ex b/lib/pleroma/web/twitter_api/views/user_view.ex
index 6c5676c04..3dc18eff8 100644
--- a/lib/pleroma/web/twitter_api/views/user_view.ex
+++ b/lib/pleroma/web/twitter_api/views/user_view.ex
@@ -11,9 +11,6 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
render_many(users, Pleroma.Web.TwitterAPI.UserView, "user.json", for: user)
end
- defp image_url(%{"url" => [ %{ "href" => href } | t ]}), do: href
- defp image_url(_), do: nil
-
def render("user.json", %{user: user = %User{}} = assigns) do
image = User.avatar_url(user)
{following, follows_you, statusnet_blocking} = if assigns[:for] do
@@ -63,4 +60,7 @@ defmodule Pleroma.Web.TwitterAPI.UserView do
"screen_name" => nickname
}
end
+
+ defp image_url(%{"url" => [ %{ "href" => href } | _ ]}), do: href
+ defp image_url(_), do: nil
end