formatter.ex: Add get_emoji_map/1
This commit is contained in:
parent
d70af32127
commit
2f76a40d02
7 changed files with 72 additions and 10 deletions
|
|
@ -9,6 +9,7 @@ defmodule Pleroma.Web.TwitterAPI.Controller do
|
|||
|
||||
alias Ecto.Changeset
|
||||
alias Pleroma.Activity
|
||||
alias Pleroma.Formatter
|
||||
alias Pleroma.Notification
|
||||
alias Pleroma.Object
|
||||
alias Pleroma.Repo
|
||||
|
|
@ -653,7 +654,16 @@ defmodule Pleroma.Web.TwitterAPI.Controller do
|
|||
|
||||
defp parse_profile_bio(user, params) do
|
||||
if bio = params["description"] do
|
||||
Map.put(params, "bio", User.parse_bio(bio, user))
|
||||
user_info =
|
||||
user.info
|
||||
|> Map.put(
|
||||
"emojis",
|
||||
Formatter.get_emoji_map(params["description"])
|
||||
)
|
||||
|
||||
params
|
||||
|> Map.put("bio", User.parse_bio(bio, user))
|
||||
|> Map.put("info", user_info)
|
||||
else
|
||||
params
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue