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
|
|
@ -513,10 +513,12 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
|||
)
|
||||
|
||||
statuses = Repo.all(q) ++ fetched
|
||||
tags = String.split(query)
|
||||
|> Enum.uniq()
|
||||
|> Enum.filter(fn tag -> String.starts_with?(tag, "#") end)
|
||||
|> Enum.map(fn tag -> String.slice(tag, 1..-1) end)
|
||||
|
||||
tags =
|
||||
String.split(query)
|
||||
|> Enum.uniq()
|
||||
|> Enum.filter(fn tag -> String.starts_with?(tag, "#") end)
|
||||
|> Enum.map(fn tag -> String.slice(tag, 1..-1) end)
|
||||
|
||||
res = %{
|
||||
"accounts" => AccountView.render("accounts.json", users: accounts, for: user, as: :user),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue