diff options
author | lain <lain@soykaf.club> | 2020-04-20 14:38:53 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-04-20 14:38:53 +0200 |
commit | b5df4a98e4044cf1360f03f7dc3a0b59932ec8f5 (patch) | |
tree | 51b58d295cb032f0dff020bfad09f8329b62286e /lib | |
parent | 7e53da250e3b41e01073148efea0fc4f49dea9d5 (diff) | |
download | pleroma-b5df4a98e4044cf1360f03f7dc3a0b59932ec8f5.tar.gz |
ChatMessageView: Support emoji.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/pleroma_api/views/chat_message_view.ex | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/pleroma/web/pleroma_api/views/chat_message_view.ex b/lib/pleroma/web/pleroma_api/views/chat_message_view.ex index fdbb9ff1b..b40ab92a0 100644 --- a/lib/pleroma/web/pleroma_api/views/chat_message_view.ex +++ b/lib/pleroma/web/pleroma_api/views/chat_message_view.ex @@ -6,6 +6,8 @@ defmodule Pleroma.Web.PleromaAPI.ChatMessageView do use Pleroma.Web, :view alias Pleroma.Chat + alias Pleroma.Web.CommonAPI.Utils + alias Pleroma.Web.MastodonAPI.StatusView def render( "show.json", @@ -18,7 +20,9 @@ defmodule Pleroma.Web.PleromaAPI.ChatMessageView do id: id |> to_string(), content: chat_message["content"], chat_id: chat_id |> to_string(), - actor: chat_message["actor"] + actor: chat_message["actor"], + created_at: Utils.to_masto_date(chat_message["published"]), + emojis: StatusView.build_emojis(chat_message["emoji"]) } end |