projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into alexgleason/pleroma...
[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 e8a1746d46a82d459dedc10799c58e92f4af2063..27c9a2e0f77a0022019e21caa4b224ca9e81b6ae 100644
(file)
--- a/
lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
+++ b/
lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
@@
-146,11
+146,8
@@
defmodule Pleroma.Web.PleromaAPI.ChatController do
blocked_ap_ids = User.blocked_users_ap_ids(user)
chats =
blocked_ap_ids = User.blocked_users_ap_ids(user)
chats =
- from(c in Chat,
- where: c.user_id == ^user_id,
- where: c.recipient not in ^blocked_ap_ids,
- order_by: [desc: c.updated_at]
- )
+ Chat.for_user_query(user_id)
+ |> where([c], c.recipient not in ^blocked_ap_ids)
|> Repo.all()
conn
|> Repo.all()
conn