X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fpleroma%2Fweb%2Fpleroma_api%2Fviews%2Fchat_message_view.ex;h=b40ab92a023cdb605e27aca516283f9c92fdef86;hb=c86143ed73ba5b2d8d373607ca706f1a428f3fe4;hp=2df5913584b83688e807ebf9419b1bec5e7abd1d;hpb=6ace22b56a3ced833bd990de5715048d6bd32f80;p=akkoma 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 2df591358..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", @@ -15,10 +17,12 @@ defmodule Pleroma.Web.PleromaAPI.ChatMessageView do } ) do %{ - id: id, + id: id |> to_string(), content: chat_message["content"], - chat_id: chat_id, - actor: chat_message["actor"] + chat_id: chat_id |> to_string(), + actor: chat_message["actor"], + created_at: Utils.to_masto_date(chat_message["published"]), + emojis: StatusView.build_emojis(chat_message["emoji"]) } end