aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/common_api
diff options
context:
space:
mode:
authorlambda <lain@soykaf.club>2019-05-03 17:26:39 +0000
committerlambda <lain@soykaf.club>2019-05-03 17:26:39 +0000
commit4948a73e3787a32140e433ded59be460ec29e8d7 (patch)
tree9efa30a7f425eda2efe4ae3f36edc875dad73458 /lib/pleroma/web/common_api
parent027ded0df799266d74d9680bd7ef24450efc910f (diff)
parentb5ad1715b2d4a2a5bdaefa2d56bde71120d23acb (diff)
downloadpleroma-4948a73e3787a32140e433ded59be460ec29e8d7.tar.gz
Merge branch 'bugfix/emoji-size' into 'develop'
Bugfix: emoji size in profile Closes #269 See merge request pleroma/pleroma!792
Diffstat (limited to 'lib/pleroma/web/common_api')
-rw-r--r--lib/pleroma/web/common_api/common_api.ex9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/pleroma/web/common_api/common_api.ex b/lib/pleroma/web/common_api/common_api.ex
index ecd183110..b53869c75 100644
--- a/lib/pleroma/web/common_api/common_api.ex
+++ b/lib/pleroma/web/common_api/common_api.ex
@@ -151,8 +151,8 @@ defmodule Pleroma.Web.CommonAPI do
),
{to, cc} <- to_for_user_and_mentions(user, mentions, in_reply_to, visibility),
context <- make_context(in_reply_to),
- cw <- data["spoiler_text"],
- full_payload <- String.trim(status <> (data["spoiler_text"] || "")),
+ cw <- data["spoiler_text"] || "",
+ full_payload <- String.trim(status <> cw),
length when length in 1..limit <- String.length(full_payload),
object <-
make_note_data(
@@ -170,10 +170,7 @@ defmodule Pleroma.Web.CommonAPI do
Map.put(
object,
"emoji",
- (Formatter.get_emoji(status) ++ Formatter.get_emoji(data["spoiler_text"]))
- |> Enum.reduce(%{}, fn {name, file, _}, acc ->
- Map.put(acc, name, "#{Pleroma.Web.Endpoint.static_url()}#{file}")
- end)
+ Formatter.get_emoji_map(full_payload)
) do
res =
ActivityPub.create(