mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-25 02:19:31 +00:00
Merge branch 'bugfix/dm-timeline-scope' into 'develop'
TwitterAPI: Fix dm_timeline displaying only half of the conversation. See merge request pleroma/pleroma!457
This commit is contained in:
commit
e4f57f89de
|
@ -130,7 +130,7 @@ defmodule Pleroma.Web.TwitterAPI.Controller do
|
|||
query =
|
||||
ActivityPub.fetch_activities_query(
|
||||
[user.ap_id],
|
||||
Map.merge(params, %{"type" => "Create", visibility: "direct"})
|
||||
Map.merge(params, %{"type" => "Create", "user" => user, visibility: "direct"})
|
||||
)
|
||||
|
||||
activities = Repo.all(query)
|
||||
|
|
|
@ -284,6 +284,12 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do
|
|||
"visibility" => "direct"
|
||||
})
|
||||
|
||||
{:ok, direct_two} =
|
||||
CommonAPI.post(user_two, %{
|
||||
"status" => "Hi @#{user_one.nickname}!",
|
||||
"visibility" => "direct"
|
||||
})
|
||||
|
||||
{:ok, _follower_only} =
|
||||
CommonAPI.post(user_one, %{
|
||||
"status" => "Hi @#{user_two.nickname}!",
|
||||
|
@ -296,8 +302,9 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do
|
|||
|> assign(:user, user_two)
|
||||
|> get("/api/statuses/dm_timeline.json")
|
||||
|
||||
[status] = json_response(res_conn, 200)
|
||||
assert status["id"] == direct.id
|
||||
[status, status_two] = json_response(res_conn, 200)
|
||||
assert status["id"] == direct_two.id
|
||||
assert status_two["id"] == direct.id
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue