Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove: #609 ローカルユーザー設定から購読許可を削除 #782

Merged
merged 3 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/controllers/api/v1/accounts/credentials_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ def account_params
:bot,
:discoverable,
:searchability,
:dissubscribable,
:hide_collections,
:indexable,
fields_attributes: [:name, :value]
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/settings/privacy_extra_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def update
private

def account_params
params.require(:account).permit(:subscription_policy, settings: UserSettings.keys)
params.require(:account).permit(settings: UserSettings.keys)
end

def set_account
Expand Down
3 changes: 1 addition & 2 deletions app/controllers/settings/profiles_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ def update
private

def account_params
# params.require(:account).permit(:display_name, :note, :bio_markdown, :avatar, :header, :locked, :my_actor_type, :searchability, :dissubscribable, :discoverable, :discoverable_local, :hide_collections, fields_attributes: [:name, :value])
params.require(:account).permit(:display_name, :note, :bio_markdown, :avatar, :header, :bot, :my_actor_type, :dissubscribable, fields_attributes: [:name, :value])
params.require(:account).permit(:display_name, :note, :bio_markdown, :avatar, :header, :bot, :my_actor_type, fields_attributes: [:name, :value])
end

def set_account
Expand Down
11 changes: 0 additions & 11 deletions app/lib/activitypub/tag_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -242,17 +242,6 @@ def limited_scope(status)
end
end

def subscribable_by(account)
case account.subscription_policy
when :allow
[COLLECTIONS[:public]]
when :followers_only
[account_followers_url(account)]
else
[]
end
end

def searchable_by(status)
searchable_by =
case status.compute_searchability_activitypub
Expand Down
2 changes: 2 additions & 0 deletions app/models/concerns/account/master_settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ module Account::MasterSettings

included do
def subscription_policy
return :allow if local?

return master_settings['subscription_policy']&.to_sym || :allow if master_settings.present?

# allow, followers_only, block
Expand Down
4 changes: 0 additions & 4 deletions app/models/concerns/user/has_settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,6 @@ def setting_dtl_force_searchability
settings['dtl_force_searchability']&.to_sym || :unchange
end

def setting_dtl_force_subscribable
settings['dtl_force_subscribable']
end

def setting_hide_statuses_count
settings['hide_statuses_count']
end
Expand Down
1 change: 0 additions & 1 deletion app/models/user_settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class KeyError < Error; end
setting :slip_local_emoji_reaction, default: false
setting :dtl_force_visibility, default: :unchange, in: %w(unchange public public_unlisted unlisted)
setting :dtl_force_searchability, default: :unchange, in: %w(unchange public public_unlisted)
setting :dtl_force_subscribable, default: false
setting :lock_follow_from_bot, default: false
setting :allow_quote, default: true
setting :reject_send_limited_to_suspects, default: false
Expand Down
8 changes: 2 additions & 6 deletions app/serializers/activitypub/actor_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ class ActivityPub::ActorSerializer < ActivityPub::Serializer
context :security

context_extensions :manually_approves_followers, :featured, :also_known_as,
:moved_to, :property_value, :discoverable, :olm, :suspended, :searchable_by, :subscribable_by,
:moved_to, :property_value, :discoverable, :olm, :suspended, :searchable_by,
:other_setting, :memorial, :indexable

attributes :id, :type, :following, :followers,
:inbox, :outbox, :featured, :featured_tags,
:preferred_username, :name, :summary,
:url, :manually_approves_followers,
:discoverable, :indexable, :published, :memorial, :searchable_by, :subscribable_by, :other_setting
:discoverable, :indexable, :published, :memorial, :searchable_by, :other_setting

has_one :public_key, serializer: ActivityPub::PublicKeySerializer

Expand Down Expand Up @@ -179,10 +179,6 @@ def searchable_by
ActivityPub::TagManager.instance.account_searchable_by(object)
end

def subscribable_by
ActivityPub::TagManager.instance.subscribable_by(object)
end

def other_setting
config = object.public_settings
config.map do |k, v|
Expand Down
3 changes: 0 additions & 3 deletions app/views/settings/preferences/other/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,6 @@
label_method: ->(item) { safe_join([t("simple_form.labels.dtl_force_searchability.#{item}")]) },
wrapper: :with_floating_label

.fields-group
= ff.input :dtl_force_subscribable, wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_dtl_force_subscribable'), hint: I18n.t('simple_form.hints.defaults.setting_dtl_force_subscribable')

%h4= t 'preferences.public_timelines'

.fields-group
Expand Down
15 changes: 0 additions & 15 deletions app/views/settings/privacy_extra/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,5 @@
.fields-group
= ff.input :reject_send_limited_to_suspects, kmyblue: true, as: :boolean, wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_reject_send_limited_to_suspects'), hint: I18n.t('simple_form.hints.defaults.setting_reject_send_limited_to_suspects')

%h4= t('privacy_extra.will_remove_settings')
%p.hint= t('privacy_extra.will_remove_settings_hint_html')

.fields-group
= f.input :subscription_policy,
as: :radio_buttons,
collection: %w(allow followers_only block),
collection_wrapper_tag: 'ul',
hint: t('simple_form.hints.defaults.subscription_policy'),
item_wrapper_tag: 'li',
kmyblue: true,
label: t('simple_form.labels.defaults.subscription_policy'),
label_method: ->(item) { safe_join([t("simple_form.labels.subscription_policy.#{item}")]) },
wrapper: :with_floating_label

.actions
= f.button :button, t('generic.save_changes'), type: :submit
1 change: 1 addition & 0 deletions config/i18n-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ ignore_missing:
- 'application_mailer.salutation'
- 'errors.500'
- 'auth.providers.*'
- 'antennas.index.{accounts,domains,keywords,tags}'

ignore_unused:
- 'activemodel.errors.*'
Expand Down
2 changes: 0 additions & 2 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1908,8 +1908,6 @@ en:
stop_deliver: Stop delivery
stop_deliver_hint_html: Mastodon posts can be freely searched by other software; privacy settings made within Mastodon will be ignored and your posts may be found by unintended people. Here, you can set up your posts so that they will not be found by other servers or software. However, there is a risk involved.
title: Privacy extra settings
will_remove_settings: This function will be removed
will_remove_settings_hint_html: This function will be removed kb14.0 or next LTS.
privacy_policy:
title: Privacy Policy
reactions:
Expand Down
2 changes: 0 additions & 2 deletions config/locales/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1870,8 +1870,6 @@ ja:
stop_deliver: 配送制限
stop_deliver_hint_html: Mastodonの投稿を、他のソフトウェアでは自由に検索することができます。Mastodon内で行ったプライバシーの設定は無視され、あなたの投稿が意図しない人に見つかるおそれがあります。ここでは、他のサーバーやソフトウェアであなたの投稿が見つからないようにする設定が可能です。ただしリスクは伴います。
title: プライバシー追加設定
will_remove_settings: 削除予定の設定
will_remove_settings_hint_html: これらの設定は、慎重に検討を重ねた結果、バージョン14または次のLTSのどちらか早い方で削除される予定です。代替の設定はありませんので、ご承知おきください。
privacy_policy:
title: プライバシーポリシー
reactions:
Expand Down
12 changes: 0 additions & 12 deletions config/locales/simple_form.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ en:
setting_display_media_hide_all: Always hide media
setting_display_media_show_all: Always show media
setting_dtl_force_searchability: 'With using #%{tag} tag, your post settings will be changed forcibly'
setting_dtl_force_subscribable: Your post can be detected local user's antenna to subscribe deep timeline
setting_dtl_force_visibility: 'With using #%{tag} tag, your post settings will be changed forcibly'
setting_emoji_reaction_policy: Even with this setting, users on other servers are free to put their emoji reaction on the post and share it within the same server. If you simply want to remove the emoji reaction from your own screen, you can disable it from the appearance settings
setting_emoji_reaction_streaming_notify_impl2: 当該サーバーの独自機能に対応したアプリを利用時に、絵文字リアクション機能を利用できます。動作確認していないため(そもそもそのようなアプリ自体を確認できていないため)正しく動かない場合があります
Expand All @@ -85,7 +84,6 @@ en:
setting_stop_emoji_reaction_streaming: Helps to save communication capacity.
setting_use_blurhash: Gradients are based on the colors of the hidden visuals but obfuscate any details
setting_use_pending_items: Hide timeline updates behind a click instead of automatically scrolling the feed
subscription_policy: Your post is not picked by antenna
username: You can use letters, numbers, and underscores
whole_word: When the keyword or phrase is alphanumeric only, it will only be applied if it matches the whole word
domain_allow:
Expand Down Expand Up @@ -162,10 +160,6 @@ en:
settings:
indexable: Your profile page may appear in search results on Google, Bing, and others.
show_application: You will always be able to see which app published your post regardless.
subscription_policy:
allow: Allow
block: Block
followers_only: Followers only
tag:
name: You can only change the casing of the letters, for example, to make it more readable
user:
Expand Down Expand Up @@ -278,7 +272,6 @@ en:
setting_display_media_hide_all: Hide all
setting_display_media_show_all: Show all
setting_dtl_force_searchability: Post searchability
setting_dtl_force_subscribable: Ignore your subscribability setting when using the DTL tag
setting_dtl_force_visibility: Post visibility
setting_dtl_menu: Show DTL menu on web
setting_emoji_reaction_policy: Emoji reaction receive/display policy
Expand Down Expand Up @@ -330,7 +323,6 @@ en:
setting_use_public_index: Include permitted accounts post to results of search
severity: Severity
sign_in_token_attempt: Security code
subscription_policy: Subscribability
title: Title
type: Import type
username: Username
Expand Down Expand Up @@ -451,10 +443,6 @@ en:
settings:
indexable: Include profile page in search engines
show_application: Display from which app you sent a post
subscription_policy:
allow: 全員に許可
block: 全員拒否
followers_only: フォロワーにのみ許可
tag:
listable: Allow this hashtag to appear in searches and suggestions
name: Hashtag
Expand Down
8 changes: 0 additions & 8 deletions config/locales/simple_form.ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ ja:
setting_display_media_hide_all: メディアを常に隠す
setting_display_media_show_all: メディアを常に表示する
setting_dtl_force_searchability: 'ハッシュタグ #%{tag} をつけて投稿するとき、検索許可を強制的に置き換えるかを設定します'
setting_dtl_force_subscribable: 購読拒否設定に関係なく、ディープタイムラインに向けた投稿はアンテナに掲載されます。ディープタイムラインをアンテナ経由で閲覧している人にあなたの発言が届きます
setting_dtl_force_visibility: 'ハッシュタグ #%{tag} をつけて投稿するとき、公開範囲を強制的に置き換えるかを設定します'
setting_emoji_reaction_policy: この設定をしても他のサーバーのユーザーはその投稿に自由に絵文字をつけ、同じサーバーの中で共有できます。単にあなた自身の画面から絵文字リアクションを除去したいだけなら、外観設定から絵文字リアクションを無効にすることができます
setting_emoji_reaction_streaming_notify_impl2: 当該サーバーの独自機能に対応したアプリを利用時に、絵文字リアクション機能を利用できます。動作確認していないため(そもそもそのようなアプリ自体を確認できていないため)正しく動かない場合があります
Expand All @@ -85,7 +84,6 @@ ja:
setting_stop_emoji_reaction_streaming: 通信容量の節約に役立ちます
setting_use_blurhash: ぼかしはメディアの色を元に生成されますが、細部は見えにくくなっています
setting_use_pending_items: 新着があってもタイムラインを自動的にスクロールしないようにします
subscription_policy: あなたの投稿はこの設定の範囲外にあるアカウントのアンテナに掲載されなくなります。Misskeyのアンテナを拒否することはできません。Mastodonの一部のサーバーもこの設定に対応しますが、挙動が一部kmyblueと異なる場合があります
username: アルファベット大文字と小文字、数字、アンダーバー「_」が使えます
whole_word: キーワードまたはフレーズが英数字のみの場合、単語全体と一致する場合のみ適用されるようになります
domain_allow:
Expand Down Expand Up @@ -274,7 +272,6 @@ ja:
setting_display_media_hide_all: 非表示
setting_display_media_show_all: 表示
setting_dtl_force_searchability: DTL投稿の検索許可
setting_dtl_force_subscribable: ディープタイムライン用のハッシュタグを購読するアンテナに限り、購読拒否設定を無視する
setting_dtl_force_visibility: DTL投稿の公開範囲
setting_dtl_menu: Webクライアントのメニューにディープタイムラインを追加する
setting_emoji_reaction_policy: 絵文字リアクション受け入れと表示設定
Expand Down Expand Up @@ -326,7 +323,6 @@ ja:
setting_use_public_index: Mastodonの標準設定によって検索が許可されたアカウントの公開投稿を検索結果に含める
severity: 重大性
sign_in_token_attempt: セキュリティコード
subscription_policy: 購読許可
title: タイトル
type: インポートする項目
username: ユーザー名
Expand Down Expand Up @@ -445,10 +441,6 @@ ja:
settings:
indexable: 検索エンジンからアクセスできるようにする
show_application: 投稿に使ったアプリを開示する
subscription_policy:
allow: 全員に許可
block: 全員拒否
followers_only: フォロワーにのみ許可
tag:
listable: 検索とディレクトリへの使用を許可する
name: ハッシュタグ
Expand Down
Loading
Loading