aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/twitter_api/utils.ex3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/pleroma/web/twitter_api/utils.ex b/lib/pleroma/web/twitter_api/utils.ex
index 82e3620f2..91dfa191f 100644
--- a/lib/pleroma/web/twitter_api/utils.ex
+++ b/lib/pleroma/web/twitter_api/utils.ex
@@ -38,7 +38,8 @@ defmodule Pleroma.Web.TwitterAPI.Utils do
end)
Enum.reduce(mentions, step_one, fn ({match, %User{ap_id: ap_id}, uuid}, text) ->
- String.replace(text, uuid, "<a href='#{ap_id}'>#{match}</a>")
+ short_match = String.split(match, "@") |> tl() |> hd()
+ String.replace(text, uuid, "<a href='#{ap_id}'>@#{short_match}</a>")
end)
end