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
5a4d55cf
Commit
5a4d55cf
authored
May 13, 2019
by
kaniini
Browse files
Merge branch 'filter-irreversible' into 'develop'
Make irreversible field, default to false in filters See merge request
!1144
parents
16cb9e5f
7701a4c8
Pipeline
#11720
passed with stages
in 5 minutes and 32 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
5a4d55cf
...
...
@@ -92,6 +92,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
-
Mastodon API: Handling of
`reblogs`
in
`/api/v1/accounts/:id/follow`
-
Mastodon API: Correct
`reblogged`
,
`favourited`
, and
`bookmarked`
values in the reblog status JSON
-
Mastodon API: Exposing default scope of the user to anyone
-
Mastodon API: Make
`irreversible`
field default to
`false`
[
`POST /api/v1/filters`
]
## [0.9.9999] - 2019-04-05
### Security
...
...
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
View file @
5a4d55cf
...
...
@@ -1536,7 +1536,7 @@ def create_filter(
user_id:
user
.
id
,
phrase:
phrase
,
context:
context
,
hide:
Map
.
get
(
params
,
"irreversible"
,
nil
),
hide:
Map
.
get
(
params
,
"irreversible"
,
false
),
whole_word:
Map
.
get
(
params
,
"boolean"
,
true
)
# expires_at
}
...
...
priv/repo/migrations/20190513175809_change_hide_column_in_filter_table.exs
0 → 100644
View file @
5a4d55cf
defmodule
Pleroma
.
Repo
.
Migrations
.
ChangeHideColumnInFilterTable
do
use
Ecto
.
Migration
def
change
do
alter
table
(
:filters
)
do
modify
:hide
,
:boolean
,
default:
false
end
end
end
test/web/mastodon_api/mastodon_api_controller_test.exs
View file @
5a4d55cf
...
...
@@ -572,6 +572,7 @@ test "creating a filter", %{conn: conn} do
assert
response
=
json_response
(
conn
,
200
)
assert
response
[
"phrase"
]
==
filter
.
phrase
assert
response
[
"context"
]
==
filter
.
context
assert
response
[
"irreversible"
]
==
false
assert
response
[
"id"
]
!=
nil
assert
response
[
"id"
]
!=
""
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