aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-09-12 09:34:39 +0200
committerRoger Braun <roger@rogerbraun.net>2017-09-12 09:34:39 +0200
commit44a650235bcb49900a84f50b2ee4d75593231c38 (patch)
treec6beeeca47f5fcccbd5b7755aeff7d164b428b5b /lib
parentcda01285f4f36ffaac0034d6f0a5da64b4a26a58 (diff)
downloadpleroma-44a650235bcb49900a84f50b2ee4d75593231c38.tar.gz
MastoAPI: Remove domain ending from account name.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/views/account_view.ex4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/mastodon_api/views/account_view.ex b/lib/pleroma/web/mastodon_api/views/account_view.ex
index 35a130b1e..85cce754a 100644
--- a/lib/pleroma/web/mastodon_api/views/account_view.ex
+++ b/lib/pleroma/web/mastodon_api/views/account_view.ex
@@ -13,7 +13,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
%{
id: user.id,
- username: user.nickname,
+ username: hd(String.split(user.nickname, "@")),
acct: user.nickname,
display_name: user.name,
locked: false,
@@ -34,7 +34,7 @@ defmodule Pleroma.Web.MastodonAPI.AccountView do
%{
id: user.id,
acct: user.nickname,
- username: user.nickname,
+ username: hd(String.split(user.nickname, "@")),
url: user.ap_id
}
end