projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' into issue/1790-updated-oban
[akkoma]
/
lib
/
pleroma
/
web
/
pleroma_api
/
controllers
/
chat_controller.ex
diff --git
a/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
b/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
index b9949236c5a5074369da4647048b856b72768332..c8ef3d91511a247531749918bb981ec79e592687 100644
(file)
--- 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
alias Pleroma.Web.PleromaAPI.ChatView
import Ecto.Query
- import Pleroma.Web.ActivityPub.ObjectValidator, only: [stringify_keys: 1]
action_fallback(Pleroma.Web.MastodonAPI.FallbackController)
action_fallback(Pleroma.Web.MastodonAPI.FallbackController)
@@
-127,7
+126,7
@@
defmodule Pleroma.Web.PleromaAPI.ChatController do
cm_refs =
chat
|> MessageReference.for_chat_query()
cm_refs =
chat
|> MessageReference.for_chat_query()
- |> Pagination.fetch_paginated(params
|> stringify_keys()
)
+ |> Pagination.fetch_paginated(params)
conn
|> put_view(MessageReferenceView)
conn
|> put_view(MessageReferenceView)
@@
-140,7
+139,7
@@
defmodule Pleroma.Web.PleromaAPI.ChatController do
end
end
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 =
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]
)
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)
conn
|> put_view(ChatView)