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
7701a4c8
Commit
7701a4c8
authored
May 13, 2019
by
Sachin Joshi
Browse files
Make irreversible field default to false in filters
parent
16cb9e5f
Changes
4
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.md
View file @
7701a4c8
...
...
@@ -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 @
7701a4c8
...
...
@@ -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 @
7701a4c8
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 @
7701a4c8
...
...
@@ -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