From: Maksim Pechnikov Date: Wed, 6 May 2020 11:47:50 +0000 (+0300) Subject: Merge branch 'develop' into issue/1276-2 X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=8b97b6f5baa7e0593414fa794ce8059a8e5b95e3;p=akkoma Merge branch 'develop' into issue/1276-2 --- 8b97b6f5baa7e0593414fa794ce8059a8e5b95e3 diff --cc lib/pleroma/web/mastodon_api/views/marker_view.ex index 415dae93b,9705b7a91..21d535d54 --- a/lib/pleroma/web/mastodon_api/views/marker_view.ex +++ b/lib/pleroma/web/mastodon_api/views/marker_view.ex @@@ -6,15 -6,13 +6,16 @@@ defmodule Pleroma.Web.MastodonAPI.Marke use Pleroma.Web, :view def render("markers.json", %{markers: markers}) do - Enum.reduce(markers, %{}, fn m, acc -> - Map.put_new(acc, m.timeline, %{ - last_read_id: m.last_read_id, - version: m.lock_version, - updated_at: NaiveDateTime.to_iso8601(m.updated_at), - pleroma: %{ - unread_count: m.unread_count - } - }) + 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: NaiveDateTime.to_iso8601(m.updated_at), ++ pleroma: %{ ++ unread_count: m.unread_count ++ } + }} end) end end