Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
1dd2c816
Commit
1dd2c816
authored
Apr 10, 2018
by
lain
Browse files
Order masto searches by date.
parent
d7654f4b
Pipeline
#1173
failed with stage
in 3 minutes and 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
View file @
1dd2c816
...
...
@@ -515,7 +515,8 @@ def search(%{assigns: %{user: user}} = conn, %{"q" => query} = params) do
a
.
data
,
^
query
),
limit:
20
limit:
20
,
order_by:
[
desc:
:inserted_at
]
)
statuses
=
Repo
.
all
(
q
)
++
fetched
...
...
@@ -605,35 +606,37 @@ def index(%{assigns: %{user: user}} = conn, _params) do
"video\/mp4"
]
},
settings:
Map
.
get
(
user
.
info
,
"settings"
)
||
%{
onboarded:
true
,
home:
%{
shows:
%{
reblog:
true
,
reply:
true
}
},
notifications:
%{
alerts:
%{
follow:
true
,
favourite:
true
,
reblog:
true
,
mention:
true
settings:
Map
.
get
(
user
.
info
,
"settings"
)
||
%{
onboarded:
true
,
home:
%{
shows:
%{
reblog:
true
,
reply:
true
}
},
notifications:
%{
alerts:
%{
follow:
true
,
favourite:
true
,
reblog:
true
,
mention:
true
},
shows:
%{
follow:
true
,
favourite:
true
,
reblog:
true
,
mention:
true
},
sounds:
%{
follow:
true
,
favourite:
true
,
reblog:
true
,
mention:
true
}
}
},
shows:
%{
follow:
true
,
favourite:
true
,
reblog:
true
,
mention:
true
},
sounds:
%{
follow:
true
,
favourite:
true
,
reblog:
true
,
mention:
true
}
}
},
push_subscription:
nil
,
accounts:
accounts
,
custom_emojis:
mastodon_emoji
,
...
...
@@ -656,7 +659,8 @@ def put_settings(%{assigns: %{user: user}} = conn, %{"data" => settings} = _para
{
:ok
,
_user
}
<-
User
.
update_and_set_cache
(
change
)
do
conn
|>
json
(%{})
else
e
->
else
e
->
conn
|>
json
(%{
error:
inspect
(
e
)})
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment