projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Web.TwitterAPI.UserView: Also view local user emojis
[akkoma]
/
lib
/
pleroma
/
web
/
twitter_api
/
twitter_api_controller.ex
diff --git
a/lib/pleroma/web/twitter_api/twitter_api_controller.ex
b/lib/pleroma/web/twitter_api/twitter_api_controller.ex
index 851f328fdc803a6838e1ff5789542ade6d22b5e1..261cc4462443d5ba82c5fe12bd0174a205ff917b 100644
(file)
--- a/
lib/pleroma/web/twitter_api/twitter_api_controller.ex
+++ b/
lib/pleroma/web/twitter_api/twitter_api_controller.ex
@@
-9,6
+9,7
@@
defmodule Pleroma.Web.TwitterAPI.Controller do
alias Ecto.Changeset
alias Pleroma.Activity
alias Ecto.Changeset
alias Pleroma.Activity
+ alias Pleroma.Formatter
alias Pleroma.Notification
alias Pleroma.Object
alias Pleroma.Repo
alias Pleroma.Notification
alias Pleroma.Object
alias Pleroma.Repo
@@
-632,7
+633,7
@@
defmodule Pleroma.Web.TwitterAPI.Controller do
defp build_info_cng(user, params) do
info_params =
defp build_info_cng(user, params) do
info_params =
- ["no_rich_text", "locked", "hide_followers", "hide_follows", "show_role"]
+ ["no_rich_text", "locked", "hide_followers", "hide_follows", "
hide_favorites", "
show_role"]
|> Enum.reduce(%{}, fn key, res ->
if value = params[key] do
Map.put(res, key, value == "true")
|> Enum.reduce(%{}, fn key, res ->
if value = params[key] do
Map.put(res, key, value == "true")
@@
-653,7
+654,16
@@
defmodule Pleroma.Web.TwitterAPI.Controller do
defp parse_profile_bio(user, params) do
if bio = params["description"] 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
else
params
end