Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma into develop

This commit is contained in:
Roger Braun 2017-06-01 11:24:03 +02:00
commit c7fdd1b7ff
14 changed files with 87 additions and 87 deletions

View file

@ -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