From 9d57a8355509462d64d3bd2af370037a3c29bf37 Mon Sep 17 00:00:00 2001 From: KMY Date: Sun, 18 Feb 2024 12:03:17 +0900 Subject: [PATCH 1/3] Pumb version to 11.0 --- lib/mastodon/version.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index 06563f3501..6676ee99d7 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -14,8 +14,8 @@ module Mastodon def kmyblue_flag # 'LTS' - 'dev' - # nil + # 'dev' + nil end def major From ad723b0cbd832f013d98bdc0dfc3e7cf0c47e2f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KMY=EF=BC=88=E9=9B=AA=E3=81=82=E3=81=99=E3=81=8B=EF=BC=89?= Date: Mon, 19 Feb 2024 09:20:57 +0900 Subject: [PATCH 2/3] =?UTF-8?q?Change:=20=E3=83=9B=E3=83=AF=E3=82=A4?= =?UTF-8?q?=E3=83=88=E3=83=AA=E3=82=B9=E3=83=88=E3=81=8C=E7=A9=BA=E3=81=A7?= =?UTF-8?q?=E3=82=82=E8=A8=AD=E5=AE=9A=E3=81=8C=E6=9C=89=E5=8A=B9=E3=81=A7?= =?UTF-8?q?=E3=81=82=E3=82=8C=E3=81=B0=E3=82=A2=E3=82=AB=E3=82=A6=E3=83=B3?= =?UTF-8?q?=E3=83=88=E4=BD=9C=E6=88=90=E3=82=92=E4=BF=9D=E7=95=99=20(#601)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Change: ホワイトリストが空でも設定が有効であればアカウント作成を保留 * Fix test --- app/services/activitypub/process_account_service.rb | 1 - config/locales/en.yml | 2 +- config/locales/ja.yml | 2 +- spec/services/activitypub/process_account_service_spec.rb | 6 +++--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/services/activitypub/process_account_service.rb b/app/services/activitypub/process_account_service.rb index 632de6091d..c9f17bdd45 100644 --- a/app/services/activitypub/process_account_service.rb +++ b/app/services/activitypub/process_account_service.rb @@ -141,7 +141,6 @@ class ActivityPub::ProcessAccountService < BaseService def blocking_new_account? return false unless Setting.hold_remote_new_accounts - return false if permit_new_account_domains.blank? permit_new_account_domains.exclude?(@domain) end diff --git a/config/locales/en.yml b/config/locales/en.yml index 8a5e5a4a3a..ccaf72a417 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -661,7 +661,7 @@ en: post_mentions_max: Mentions max for posts post_stranger_mentions_max: 投稿に設定可能なメンションの最大数 (If the mentions include at least one person who is not a follower of yours) remote_approval_list: List of remote accounts awaiting approval - remote_approval_hint: If you set one or more domains on the list of domains for which you want to automatically approve new users, newly recognized accounts on unspecified domains will be placed in suspend status. You can review that list and approve them if necessary. If none is specified, all remote accounts are approved immediately. + remote_approval_hint: Newly recognized accounts with unspecified domains will be placed in Suspended status. You can review that list and approve them if necessary. If this setting is not enabled, all remote accounts will be approved immediately. stranger_mention_from_local_ng: フォローしていないアカウントへのメンションのNGワードを、ローカルユーザーによる投稿にも適用する stranger_mention_from_local_ng_hint: サーバーの登録が承認制でない場合、あなたのサーバーにもスパムが入り込む可能性があります test_error: Testing is returned any errors diff --git a/config/locales/ja.yml b/config/locales/ja.yml index d49383038b..e11eb52ce7 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -654,7 +654,7 @@ ja: post_mentions_max: 投稿に設定可能なメンションの最大数 post_stranger_mentions_max: 投稿に設定可能なメンションの最大数 (メンション先にフォロワー以外を1人でも含む場合) remote_approval_list: 承認待ちのリモートアカウント一覧 - remote_approval_hint: 新規ユーザーを自動承認するドメインリストに1つ以上のドメインを設定すると、指定されていないドメインで新しく認識されたアカウントはサスペンド状態になります。その一覧を確認し、必要であれば承認を行うことができます。何も指定しなかった場合、全てのリモートアカウントが即座に承認されます。 + remote_approval_hint: 指定されていないドメインで新しく認識されたアカウントはサスペンド状態になります。その一覧を確認し、必要であれば承認を行うことができます。この設定が有効でない場合、全てのリモートアカウントが即座に承認されます。 stranger_mention_from_local_ng: フォローしていないアカウントへのメンションのNGワードを、ローカルユーザーによる投稿にも適用する stranger_mention_from_local_ng_hint: サーバーの登録が承認制でない場合、あなたのサーバーにもスパムが入り込む可能性があります test_error: NGワードのテストに失敗しました。正規表現のミスが含まれているかもしれません diff --git a/spec/services/activitypub/process_account_service_spec.rb b/spec/services/activitypub/process_account_service_spec.rb index c9460f9b18..37817f204a 100644 --- a/spec/services/activitypub/process_account_service_spec.rb +++ b/spec/services/activitypub/process_account_service_spec.rb @@ -29,11 +29,11 @@ RSpec.describe ActivityPub::ProcessAccountService, type: :service do Setting.permit_new_account_domains = permit_new_account_domains end - it 'created account in a simple case' do + it 'creates pending account in a simple case' do expect(subject).to_not be_nil expect(subject.uri).to eq 'https://foo.test' - expect(subject.suspended?).to be false - expect(subject.remote_pending).to be false + expect(subject.suspended?).to be true + expect(subject.remote_pending).to be true end context 'when is blocked' do From 8a9a29cba1d9b5635c09f164c77bf8ed30508858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KMY=EF=BC=88=E9=9B=AA=E3=81=82=E3=81=99=E3=81=8B=EF=BC=89?= Date: Tue, 20 Feb 2024 09:24:58 +0900 Subject: [PATCH 3/3] =?UTF-8?q?Fix:=20=E6=96=B0=E8=A6=8F=E7=99=BB=E9=8C=B2?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E6=99=82=E9=96=93=E5=B8=AF=E3=82=92=E7=A9=BA?= =?UTF-8?q?=E6=AC=84=E3=81=AB=E3=81=99=E3=82=8B=E3=81=A8=E3=80=81=E7=94=BB?= =?UTF-8?q?=E9=9D=A2=E3=81=8C=E8=A1=A8=E7=A4=BA=E3=81=A7=E3=81=8D=E3=81=AA?= =?UTF-8?q?=E3=81=8F=E3=81=AA=E3=82=8B=E5=95=8F=E9=A1=8C=20(#603)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix: 新規登録可能時間帯を空欄にすると、画面が表示できなくなる問題 * リファクタリング * Fix test --- app/helpers/registration_limitation_helper.rb | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/app/helpers/registration_limitation_helper.rb b/app/helpers/registration_limitation_helper.rb index 65e295720c..4ac04450aa 100644 --- a/app/helpers/registration_limitation_helper.rb +++ b/app/helpers/registration_limitation_helper.rb @@ -32,20 +32,22 @@ module RegistrationLimitationHelper end def registrations_in_time? - start_hour = Setting.registrations_start_hour || 0 - end_hour = Setting.registrations_end_hour || 24 - secondary_start_hour = Setting.registrations_secondary_start_hour || 0 - secondary_end_hour = Setting.registrations_secondary_end_hour || 0 + start_hour = Setting.registrations_start_hour + end_hour = Setting.registrations_end_hour + secondary_start_hour = Setting.registrations_secondary_start_hour + secondary_end_hour = Setting.registrations_secondary_end_hour + + start_hour = 0 unless start_hour.is_a?(Integer) + end_hour = 0 unless end_hour.is_a?(Integer) + secondary_start_hour = 0 unless secondary_start_hour.is_a?(Integer) + secondary_end_hour = 0 unless secondary_end_hour.is_a?(Integer) return true if start_hour >= end_hour && secondary_start_hour >= secondary_end_hour current_hour = Time.now.utc.hour - primary_permitted = false - primary_permitted = start_hour <= current_hour && current_hour < end_hour if start_hour < end_hour && end_hour.positive? - secondary_permitted = false - secondary_permitted = secondary_start_hour <= current_hour && current_hour < secondary_end_hour if secondary_start_hour < secondary_end_hour && secondary_end_hour.positive? - primary_permitted || secondary_permitted + (start_hour < end_hour && end_hour.positive? && current_hour.between?(start_hour, end_hour - 1)) || + (secondary_start_hour < secondary_end_hour && secondary_end_hour.positive? && current_hour.between?(secondary_start_hour, secondary_end_hour - 1)) end def reset_registration_limit_caches!