Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into remake-remodel-dms
[akkoma] / lib / pleroma / web / pleroma_api / views / chat_message_view.ex
index a821479ab7a3fac98a0bbc73707b01fb3c4c8a46..b088a87346fd0cee75b13b30daeb29eb54d43ffd 100644 (file)
@@ -23,7 +23,10 @@ defmodule Pleroma.Web.PleromaAPI.ChatMessageView do
       chat_id: chat_id |> to_string(),
       account_id: User.get_cached_by_ap_id(chat_message["actor"]).id,
       created_at: Utils.to_masto_date(chat_message["published"]),
-      emojis: StatusView.build_emojis(chat_message["emoji"])
+      emojis: StatusView.build_emojis(chat_message["emoji"]),
+      attachment:
+        chat_message["attachment"] &&
+          StatusView.render("attachment.json", attachment: chat_message["attachment"])
     }
   end