X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fpleroma_api%2Fcontrollers%2Fchat_controller.ex;h=c8ef3d91511a247531749918bb981ec79e592687;hb=80c21100db306ce45856bbdb97d3439676babeeb;hp=b9949236c5a5074369da4647048b856b72768332;hpb=fe2a5d061463313f447b0557de05572fa3771728;p=akkoma diff --git a/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex b/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex index b9949236c..c8ef3d915 100644 --- a/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex +++ b/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex @@ -17,7 +17,6 @@ defmodule Pleroma.Web.PleromaAPI.ChatController do alias Pleroma.Web.PleromaAPI.ChatView import Ecto.Query - import Pleroma.Web.ActivityPub.ObjectValidator, only: [stringify_keys: 1] action_fallback(Pleroma.Web.MastodonAPI.FallbackController) @@ -127,7 +126,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatController do cm_refs = chat |> MessageReference.for_chat_query() - |> Pagination.fetch_paginated(params |> stringify_keys()) + |> Pagination.fetch_paginated(params) conn |> put_view(MessageReferenceView) @@ -140,7 +139,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatController do end end - def index(%{assigns: %{user: %{id: user_id} = user}} = conn, params) do + def index(%{assigns: %{user: %{id: user_id} = user}} = conn, _params) do blocked_ap_ids = User.blocked_users_ap_ids(user) chats = @@ -149,7 +148,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatController do where: c.recipient not in ^blocked_ap_ids, order_by: [desc: c.updated_at] ) - |> Pagination.fetch_paginated(params |> stringify_keys) + |> Repo.all() conn |> put_view(ChatView)