aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/twitter_api
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-04-17 14:12:36 +0200
committerRoger Braun <roger@rogerbraun.net>2017-04-17 14:12:36 +0200
commit36e883cd4bed9c07df2a1dc1038265e075bea5c6 (patch)
tree8f80c96dfdc3d590751b9dca8f8aa39331cd6acf /lib/pleroma/web/twitter_api
parentce6cc84a4a9bfe1d47d00201ab31c241878f0ab9 (diff)
downloadpleroma-36e883cd4bed9c07df2a1dc1038265e075bea5c6.tar.gz
Add basic Ostatus user representer.
Diffstat (limited to 'lib/pleroma/web/twitter_api')
-rw-r--r--lib/pleroma/web/twitter_api/representers/user_representer.ex6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/pleroma/web/twitter_api/representers/user_representer.ex b/lib/pleroma/web/twitter_api/representers/user_representer.ex
index 2ee4ee254..7582a0f22 100644
--- a/lib/pleroma/web/twitter_api/representers/user_representer.ex
+++ b/lib/pleroma/web/twitter_api/representers/user_representer.ex
@@ -4,11 +4,7 @@ defmodule Pleroma.Web.TwitterAPI.Representers.UserRepresenter do
alias Pleroma.User
def to_map(user, opts) do
- image = case user.avatar do
- %{"url" => [%{"href" => href} | _]} -> href
- _ -> "https://placehold.it/48x48"
- end
-
+ image = User.avatar_url(user)
following = if opts[:for] do
User.following?(opts[:for], user)
else