]> cat aescling's git repositories - mastodon.git/commit
Keyword/phrase filtering (#7905)
authorEugen Rochko <eugen@zeonfederated.com>
Fri, 29 Jun 2018 13:34:36 +0000 (15:34 +0200)
committerGitHub <noreply@github.com>
Fri, 29 Jun 2018 13:34:36 +0000 (15:34 +0200)
commitcdb101340a20183a82889f811d9311c370c855e5
treedaacd56d1edbf359b0d97a926e90b999ba7f6129
parentfbee9b5ac898e571e384792a92b40fa1524cf127
Keyword/phrase filtering (#7905)

* Add keyword filtering

    GET|POST       /api/v1/filters
    GET|PUT|DELETE /api/v1/filters/:id

- Irreversible filters can drop toots from home or notifications
- Other filters can hide toots through the client app
- Filters use a phrase valid in particular contexts, expiration

* Make sure expired filters don't get applied client-side

* Add missing API methods

* Remove "regex filter" from column settings

* Add tests

* Add test for FeedManager

* Add CustomFilter test

* Add UI for managing filters

* Add streaming API event to allow syncing filters

* Fix tests
38 files changed:
app/controllers/api/v1/filters_controller.rb [new file with mode: 0644]
app/controllers/filters_controller.rb [new file with mode: 0644]
app/javascript/mastodon/actions/filters.js [new file with mode: 0644]
app/javascript/mastodon/actions/streaming.js
app/javascript/mastodon/components/status.js
app/javascript/mastodon/components/status_list.js
app/javascript/mastodon/containers/status_container.js
app/javascript/mastodon/features/community_timeline/components/column_settings.js
app/javascript/mastodon/features/compose/containers/reply_indicator_container.js
app/javascript/mastodon/features/direct_timeline/index.js
app/javascript/mastodon/features/home_timeline/components/column_settings.js
app/javascript/mastodon/features/status/index.js
app/javascript/mastodon/features/ui/containers/status_list_container.js
app/javascript/mastodon/features/ui/index.js
app/javascript/mastodon/reducers/filters.js [new file with mode: 0644]
app/javascript/mastodon/reducers/index.js
app/javascript/mastodon/selectors/index.js
app/javascript/styles/mastodon/components.scss
app/lib/feed_manager.rb
app/models/account.rb
app/models/concerns/expireable.rb [new file with mode: 0644]
app/models/custom_filter.rb [new file with mode: 0644]
app/models/invite.rb
app/serializers/rest/filter_serializer.rb [new file with mode: 0644]
app/views/filters/_fields.html.haml [new file with mode: 0644]
app/views/filters/edit.html.haml [new file with mode: 0644]
app/views/filters/index.html.haml [new file with mode: 0644]
app/views/filters/new.html.haml [new file with mode: 0644]
config/locales/en.yml
config/locales/simple_form.en.yml
config/navigation.rb
config/routes.rb
db/migrate/20180628181026_create_custom_filters.rb [new file with mode: 0644]
db/schema.rb
spec/controllers/api/v1/filter_controller_spec.rb [new file with mode: 0644]
spec/fabricators/custom_filter_fabricator.rb [new file with mode: 0644]
spec/lib/feed_manager_spec.rb
spec/models/custom_filter_spec.rb [new file with mode: 0644]