run mix format
This commit is contained in:
parent
f32e19f668
commit
725b05d04a
3 changed files with 24 additions and 16 deletions
|
@ -404,18 +404,22 @@ defmodule Pleroma.User do
|
||||||
from(
|
from(
|
||||||
u in User,
|
u in User,
|
||||||
select_merge: %{
|
select_merge: %{
|
||||||
search_distance: fragment(
|
search_distance:
|
||||||
"? <-> (? || ?)",
|
fragment(
|
||||||
^query,
|
"? <-> (? || ?)",
|
||||||
u.nickname,
|
^query,
|
||||||
u.name
|
u.nickname,
|
||||||
)}
|
u.name
|
||||||
|
)
|
||||||
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
q = from(s in subquery(inner),
|
q =
|
||||||
order_by: s.search_distance,
|
from(
|
||||||
limit: 20
|
s in subquery(inner),
|
||||||
)
|
order_by: s.search_distance,
|
||||||
|
limit: 20
|
||||||
|
)
|
||||||
|
|
||||||
Repo.all(q)
|
Repo.all(q)
|
||||||
end
|
end
|
||||||
|
|
|
@ -86,7 +86,11 @@ defmodule Pleroma.Web.WebFinger do
|
||||||
"href" => "data:application/magic-public-key,#{magic_key}"
|
"href" => "data:application/magic-public-key,#{magic_key}"
|
||||||
},
|
},
|
||||||
%{"rel" => "self", "type" => "application/activity+json", "href" => user.ap_id},
|
%{"rel" => "self", "type" => "application/activity+json", "href" => user.ap_id},
|
||||||
%{"rel" => "self", "type" => "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"", "href" => user.ap_id},
|
%{
|
||||||
|
"rel" => "self",
|
||||||
|
"type" => "application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"",
|
||||||
|
"href" => user.ap_id
|
||||||
|
},
|
||||||
%{
|
%{
|
||||||
"rel" => "http://ostatus.org/schema/1.0/subscribe",
|
"rel" => "http://ostatus.org/schema/1.0/subscribe",
|
||||||
"template" => OStatus.remote_follow_path()
|
"template" => OStatus.remote_follow_path()
|
||||||
|
|
|
@ -8,11 +8,11 @@ defmodule HTTPoisonMock do
|
||||||
[Accept: "application/xrd+xml,application/jrd+json"],
|
[Accept: "application/xrd+xml,application/jrd+json"],
|
||||||
follow_redirect: true
|
follow_redirect: true
|
||||||
) do
|
) do
|
||||||
{:ok,
|
{:ok,
|
||||||
%Response{
|
%Response{
|
||||||
status_code: 200,
|
status_code: 200,
|
||||||
body: File.read!("test/fixtures/httpoison_mock/kaniini@gerzilla.de.json")
|
body: File.read!("test/fixtures/httpoison_mock/kaniini@gerzilla.de.json")
|
||||||
}}
|
}}
|
||||||
end
|
end
|
||||||
|
|
||||||
def get(
|
def get(
|
||||||
|
|
Loading…
Reference in a new issue