mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-18 15:14:42 +00:00
Oh no! More datetime fixes!
This commit is contained in:
parent
14b4029b1d
commit
ad5001828e
2 changed files with 2 additions and 2 deletions
|
@ -158,7 +158,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
|||
result = Enum.map(notifications, fn (%{id: id, activity: activity, inserted_at: created_at}) ->
|
||||
actor = User.get_cached_by_ap_id(activity.data["actor"])
|
||||
created_at = NaiveDateTime.to_iso8601(created_at)
|
||||
|> String.replace(~r/\.\d+$/, ".000Z")
|
||||
|> String.replace(~r/(\.\d+)?$/, ".000Z", global: false)
|
||||
case activity.data["type"] do
|
||||
"Create" ->
|
||||
%{id: id, type: "mention", created_at: created_at, account: AccountView.render("account.json", %{user: actor}), status: StatusView.render("status.json", %{activity: activity})}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue