logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

marker_view.ex (579B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.Web.MastodonAPI.MarkerView do
  5. use Pleroma.Web, :view
  6. def render("markers.json", %{markers: markers}) do
  7. Map.new(markers, fn m ->
  8. {m.timeline,
  9. %{
  10. last_read_id: m.last_read_id,
  11. version: m.lock_version,
  12. updated_at: NaiveDateTime.to_iso8601(m.updated_at),
  13. pleroma: %{
  14. unread_count: m.unread_count
  15. }
  16. }}
  17. end)
  18. end
  19. end