Add tag timelines.
[akkoma] / lib / pleroma / web / mastodon_api / views / status_view.ex
index 16ed7bd559e0f8847ecc7efe7f238a3f79d365c2..e561b32fe929f337ab33f071cf79ff8701c2fd34 100644 (file)
@@ -29,7 +29,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
     created_at = (object["published"] || "")
     |> NaiveDateTime.from_iso8601!
     |> NaiveDateTime.to_iso8601
-    |> String.replace(~r/\.\d+$/, ".000Z")
+    |> String.replace(~r/(\.\d+)?$/, ".000Z", global: false)
 
     %{
       id: activity.id,
@@ -52,7 +52,10 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
       media_attachments: attachments,
       mentions: mentions,
       tags: [], # fix,
-      application: nil,
+      application: %{
+        name: "Web",
+        website: nil
+      },
       language: nil
     }
   end
@@ -73,6 +76,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusView do
       url: href,
       remote_url: href,
       preview_url: href,
+      text_url: href,
       type: type
     }
   end