aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-09-09 12:09:53 +0200
committerRoger Braun <roger@rogerbraun.net>2017-09-09 12:09:53 +0200
commitc6bdc5960c4dbbdd5d5d86b6d49669611392c73f (patch)
tree59da3ec2469f7b8824b05cff84ac14f40b22c4f4 /lib
parenta22f2e683b5e77eb563f0ca05a2160578ed2ac82 (diff)
downloadpleroma-c6bdc5960c4dbbdd5d5d86b6d49669611392c73f.tar.gz
Test for Mastodon AccountView
Handles users and mentions.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/views/account_view.ex (renamed from lib/pleroma/web/mastodon_api/views/user_view.ex)9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/user_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex
index 88e32d6f9..5f6ca84d0 100644
--- a/lib/pleroma/web/mastodon_api/views/user_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/account_view.ex
@@ -24,4 +24,13 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
header_static: ""
}
end
+
+ def render("mention.json", %{user: user}) do
+ %{
+ id: user.id,
+ acct: user.nickname,
+ username: user.nickname,
+ url: user.ap_id
+ }
+ end
end