projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
combined
(merge:
dfb831c
9fb88c8
)
Merge remote-tracking branch 'upstream/develop' into chat-moderation
author
Alex Gleason
<alex@alexgleason.me>
Fri, 11 Sep 2020 19:13:38 +0000
(14:13 -0500)
committer
Alex Gleason
<alex@alexgleason.me>
Fri, 11 Sep 2020 19:13:38 +0000
(14:13 -0500)
1
2
lib/pleroma/chat.ex
patch
|
diff1
|
diff2
|
blob
|
history
lib/pleroma/web/common_api/common_api.ex
patch
|
diff1
|
diff2
|
blob
|
history
lib/pleroma/web/mastodon_api/views/status_view.ex
patch
|
diff1
|
diff2
|
blob
|
history
test/support/factory.ex
patch
|
diff1
|
diff2
|
blob
|
history
test/web/admin_api/controllers/admin_api_controller_test.exs
patch
|
diff1
|
diff2
|
blob
|
history
test/web/common_api/common_api_test.exs
patch
|
diff1
|
diff2
|
blob
|
history
diff --cc
lib/pleroma/chat.ex
index b38c5c3ddfe92801abcab51042a68e66d9b1e6e8,24a86371e7801594caa18acc33b7b9eb999f73b6..84f8806a084c1ad957bc477af6d6b3ac8c88fd7f
---
1
/
lib/pleroma/chat.ex
---
2
/
lib/pleroma/chat.ex
+++ b/
lib/pleroma/chat.ex
@@@
-71,14
-69,4
+71,12
@@@
defmodule Pleroma.Chat d
conflict_target: [:user_id, :recipient]
)
end
- order_by: [desc: c.updated_at],
- inner_join: u in User,
- on: u.ap_id == c.recipient
+
+ @spec for_user_query(FlakeId.Ecto.CompatType.t()) :: Ecto.Query.t()
+ def for_user_query(user_id) do
+ from(c in Chat,
+ where: c.user_id == ^user_id,
++ order_by: [desc: c.updated_at]
+ )
+ end
end
diff --cc
lib/pleroma/web/common_api/common_api.ex
Simple merge
diff --cc
lib/pleroma/web/mastodon_api/views/status_view.ex
Simple merge
diff --cc
test/support/factory.ex
Simple merge
diff --cc
test/web/admin_api/controllers/admin_api_controller_test.exs
Simple merge
diff --cc
test/web/common_api/common_api_test.exs
Simple merge