diff options
author | Jeong Arm <kjwonmail@gmail.com> | 2023-10-17 23:12:03 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-17 16:12:03 +0200 |
commit | ad44d832b8eaf42526b7bb26c94b39bfa6795457 (patch) | |
tree | 37c7d44c38e257c099434386e82ea5493976e356 | |
parent | 2528a0721f536f747fec9d60d7a3643bf33e7cdc (diff) |
Support "in:public" search filter (#26976)
-rw-r--r-- | app/javascript/mastodon/features/compose/components/search.jsx | 2 | ||||
-rw-r--r-- | app/lib/search_query_transformer.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/compose/components/search.jsx b/app/javascript/mastodon/features/compose/components/search.jsx index dfbfa98f5e9..2525df77933 100644 --- a/app/javascript/mastodon/features/compose/components/search.jsx +++ b/app/javascript/mastodon/features/compose/components/search.jsx @@ -64,7 +64,7 @@ class Search extends PureComponent { { label: <><mark>before:</mark> <FormattedMessage id='search_popout.specific_date' defaultMessage='specific date' /></>, action: e => { e.preventDefault(); this._insertText('before:'); } }, { label: <><mark>during:</mark> <FormattedMessage id='search_popout.specific_date' defaultMessage='specific date' /></>, action: e => { e.preventDefault(); this._insertText('during:'); } }, { label: <><mark>after:</mark> <FormattedMessage id='search_popout.specific_date' defaultMessage='specific date' /></>, action: e => { e.preventDefault(); this._insertText('after:'); } }, - { label: <><mark>in:</mark> <FormattedList type='disjunction' value={['all', 'library']} /></>, action: e => { e.preventDefault(); this._insertText('in:'); } } + { label: <><mark>in:</mark> <FormattedList type='disjunction' value={['all', 'library', 'public']} /></>, action: e => { e.preventDefault(); this._insertText('in:'); } } ]; setRef = c => { diff --git a/app/lib/search_query_transformer.rb b/app/lib/search_query_transformer.rb index a45ae3d09bc..927495eace9 100644 --- a/app/lib/search_query_transformer.rb +++ b/app/lib/search_query_transformer.rb @@ -58,6 +58,8 @@ class SearchQueryTransformer < Parslet::Transform case @flags['in'] when 'library' [StatusesIndex] + when 'public' + [PublicStatusesIndex] else [PublicStatusesIndex, StatusesIndex] end |