Merge remote-tracking branch 'upstream/develop' into chat-moderation
authorAlex Gleason <alex@alexgleason.me>
Fri, 11 Sep 2020 19:13:38 +0000 (14:13 -0500)
committerAlex Gleason <alex@alexgleason.me>
Fri, 11 Sep 2020 19:13:38 +0000 (14:13 -0500)
1  2 
lib/pleroma/chat.ex
lib/pleroma/web/common_api/common_api.ex
lib/pleroma/web/mastodon_api/views/status_view.ex
test/support/factory.ex
test/web/admin_api/controllers/admin_api_controller_test.exs
test/web/common_api/common_api_test.exs

index b38c5c3ddfe92801abcab51042a68e66d9b1e6e8,24a86371e7801594caa18acc33b7b9eb999f73b6..84f8806a084c1ad957bc477af6d6b3ac8c88fd7f
@@@ -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
Simple merge