Load all users at once in timelines.
This commit is contained in:
parent
96007753ad
commit
b3b7ab5d9a
5 changed files with 94 additions and 30 deletions
|
|
@ -56,7 +56,7 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubTest do
|
|||
"id" => "some_id",
|
||||
"object" => %{
|
||||
"id" => "object_id"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
{:ok, %Activity{} = activity} = ActivityPub.insert(data)
|
||||
|
|
|
|||
|
|
@ -64,7 +64,12 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do
|
|||
{
|
||||
TwitterAPI,
|
||||
[],
|
||||
[context_to_conversation_id: fn(_) -> false end]
|
||||
[context_to_conversation_id: fn _ -> false end]
|
||||
},
|
||||
{
|
||||
User,
|
||||
[:passthrough],
|
||||
[get_cached_by_ap_id: fn _ -> nil end]
|
||||
}
|
||||
]
|
||||
|
||||
|
|
@ -73,7 +78,9 @@ defmodule Pleroma.Web.TwitterAPI.ActivityViewTest do
|
|||
|
||||
assert result["statusnet_conversation_id"] == convo_id
|
||||
assert result["user"]
|
||||
refute called TwitterAPI.context_to_conversation_id(:_)
|
||||
refute called(TwitterAPI.context_to_conversation_id(:_))
|
||||
refute called(User.get_cached_by_ap_id(user.ap_id))
|
||||
refute called(User.get_cached_by_ap_id(other_user.ap_id))
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue