Reply Filtering: Refactor.
This commit is contained in:
parent
e2f3030c86
commit
d89cd0a197
5 changed files with 69 additions and 77 deletions
|
|
@ -508,13 +508,13 @@ defmodule Pleroma.LoadTesting.Fetcher do
|
|||
"Public timeline with reply filtering - following" => fn ->
|
||||
public_params
|
||||
|> Map.put("reply_visibility", "following")
|
||||
|> Map.put("user", user)
|
||||
|> Map.put("reply_filtering_user", user)
|
||||
|> ActivityPub.fetch_public_activities()
|
||||
end,
|
||||
"Public timeline with reply filtering - self" => fn ->
|
||||
public_params
|
||||
|> Map.put("reply_visibility", "self")
|
||||
|> Map.put("user", user)
|
||||
|> Map.put("reply_filtering_user", user)
|
||||
|> ActivityPub.fetch_public_activities()
|
||||
end
|
||||
},
|
||||
|
|
@ -531,12 +531,19 @@ defmodule Pleroma.LoadTesting.Fetcher do
|
|||
ActivityPub.fetch_activities(recipients, private_params)
|
||||
end,
|
||||
"Home timeline with reply filtering - following" => fn ->
|
||||
private_params = Map.put(private_params, "reply_visibility", "following")
|
||||
private_params =
|
||||
private_params
|
||||
|> Map.put("reply_filtering_user", user)
|
||||
|> Map.put("reply_visibility", "following")
|
||||
|
||||
ActivityPub.fetch_activities(recipients, private_params)
|
||||
end,
|
||||
"Home timeline with reply filtering - self" => fn ->
|
||||
private_params = Map.put(private_params, "reply_visibility", "self")
|
||||
private_params =
|
||||
private_params
|
||||
|> Map.put("reply_filtering_user", user)
|
||||
|> Map.put("reply_visibility", "self")
|
||||
|
||||
ActivityPub.fetch_activities(recipients, private_params)
|
||||
end
|
||||
},
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ defmodule Mix.Tasks.Pleroma.LoadTesting do
|
|||
]
|
||||
|
||||
def run(args) do
|
||||
Logger.configure(level: :error)
|
||||
Mix.Pleroma.start_pleroma()
|
||||
clean_tables()
|
||||
{opts, _} = OptionParser.parse!(args, strict: @switches, aliases: @aliases)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue