mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-27 11:08:28 +00:00
Merge branch 'filter-irreversible' into 'develop'
Make irreversible field, default to false in filters See merge request pleroma/pleroma!1144
This commit is contained in:
commit
5a4d55cf91
|
@ -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: Handling of `reblogs` in `/api/v1/accounts/:id/follow`
|
||||||
- Mastodon API: Correct `reblogged`, `favourited`, and `bookmarked` values in the reblog status JSON
|
- 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: 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
|
## [0.9.9999] - 2019-04-05
|
||||||
### Security
|
### Security
|
||||||
|
|
|
@ -1536,7 +1536,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
|
||||||
user_id: user.id,
|
user_id: user.id,
|
||||||
phrase: phrase,
|
phrase: phrase,
|
||||||
context: context,
|
context: context,
|
||||||
hide: Map.get(params, "irreversible", nil),
|
hide: Map.get(params, "irreversible", false),
|
||||||
whole_word: Map.get(params, "boolean", true)
|
whole_word: Map.get(params, "boolean", true)
|
||||||
# expires_at
|
# expires_at
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
defmodule Pleroma.Repo.Migrations.ChangeHideColumnInFilterTable do
|
||||||
|
use Ecto.Migration
|
||||||
|
|
||||||
|
def change do
|
||||||
|
alter table(:filters) do
|
||||||
|
modify :hide, :boolean, default: false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -572,6 +572,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIControllerTest do
|
||||||
assert response = json_response(conn, 200)
|
assert response = json_response(conn, 200)
|
||||||
assert response["phrase"] == filter.phrase
|
assert response["phrase"] == filter.phrase
|
||||||
assert response["context"] == filter.context
|
assert response["context"] == filter.context
|
||||||
|
assert response["irreversible"] == false
|
||||||
assert response["id"] != nil
|
assert response["id"] != nil
|
||||||
assert response["id"] != ""
|
assert response["id"] != ""
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue