fix(mastodon_api): use the Mastodon date format for marker updated_at
Ported from Akkoma 720785b4c. Co-authored-by: Oneric <oneric@oneric.stub>
This commit is contained in:
parent
e0546f188d
commit
13663cba71
4 changed files with 19 additions and 5 deletions
|
|
@ -5,13 +5,15 @@
|
|||
defmodule Pleroma.Web.MastodonAPI.MarkerView do
|
||||
use Pleroma.Web, :view
|
||||
|
||||
alias Pleroma.Web.CommonAPI.Utils
|
||||
|
||||
def render("markers.json", %{markers: markers}) do
|
||||
Map.new(markers, fn m ->
|
||||
{m.timeline,
|
||||
%{
|
||||
last_read_id: m.last_read_id,
|
||||
version: m.lock_version,
|
||||
updated_at: NaiveDateTime.to_iso8601(m.updated_at),
|
||||
updated_at: Utils.to_masto_date(m.updated_at),
|
||||
pleroma: %{
|
||||
unread_count: m.unread_count
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue