diff options
author | Roger Braun <roger@rogerbraun.net> | 2017-06-01 11:24:03 +0200 |
---|---|---|
committer | Roger Braun <roger@rogerbraun.net> | 2017-06-01 11:24:03 +0200 |
commit | c7fdd1b7ff6e7a08389395d555862eaec9721b08 (patch) | |
tree | 2eacd5f670c35fa834399636a0cc5c8de53ba054 /lib/pleroma/web/twitter_api/utils.ex | |
parent | 87c2c42badd7d8cd1f36e979eae923725f27bbe7 (diff) | |
parent | 4cfe1e0c9becebbc5665eb28b187451f96c73555 (diff) | |
download | pleroma-c7fdd1b7ff6e7a08389395d555862eaec9721b08.tar.gz |
Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma into develop
Diffstat (limited to 'lib/pleroma/web/twitter_api/utils.ex')
-rw-r--r-- | lib/pleroma/web/twitter_api/utils.ex | 3 |
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 32b9eab44..65d893869 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 |