Skip to content

Commit

Permalink
Change: #322 fedibird_capabilitiesからprofile_searchを削除 (#387)
Browse files Browse the repository at this point in the history
* Change: #322 `fedibird_capabilities`から`profile_search`を削除

* v1にも追加
  • Loading branch information
kmycode authored Dec 26, 2023
1 parent f3120a8 commit fb6e125
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/helpers/kmyblue_capabilities_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def fedibird_capabilities
kmyblue_list_notification
)

capabilities << :profile_search unless Chewy.enabled?
capabilities << :full_text_search if Chewy.enabled?
if Setting.enable_emoji_reaction
capabilities << :emoji_reaction
capabilities << :enable_wide_emoji_reaction
Expand Down
3 changes: 2 additions & 1 deletion app/javascript/mastodon/features/about/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ class About extends PureComponent {
const isPublicUnlistedVisibility = fedibirdCapabilities.includes('kmyblue_visibility_public_unlisted');
const isEmojiReaction = fedibirdCapabilities.includes('emoji_reaction');
const isLocalTimeline = !fedibirdCapabilities.includes('timeline_no_local');
const isFullTextSearch = !fedibirdCapabilities.includes('profile_search');

const isFullTextSearch = server.getIn(['configuration', 'search', 'enabled']);

return (
<Column bindToDocument={!multiColumn} label={intl.formatMessage(messages.title)}>
Expand Down
5 changes: 5 additions & 0 deletions app/serializers/rest/instance_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ def configuration
reactions: {
max_reactions: EmojiReaction::EMOJI_REACTION_PER_ACCOUNT_LIMIT,
},

# https://github.com/mastodon/mastodon/pull/27009
search: {
enabled: Chewy.enabled?,
},
}
end

Expand Down
5 changes: 5 additions & 0 deletions app/serializers/rest/v1/instance_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ def configuration
reactions: {
max_reactions: EmojiReaction::EMOJI_REACTION_PER_ACCOUNT_LIMIT,
},

# https://github.com/mastodon/mastodon/pull/27009
search: {
enabled: Chewy.enabled?,
},
}
end

Expand Down

0 comments on commit fb6e125

Please sign in to comment.