From b35fd9faba1fea9f9a17f49352ad869592f489a8 Mon Sep 17 00:00:00 2001 From: KMY Date: Sun, 24 Sep 2023 12:24:56 +0900 Subject: [PATCH 1/3] #21 Tell about kmyblue update check when initial setup --- lib/tasks/mastodon.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/mastodon.rake b/lib/tasks/mastodon.rake index f68d1cf1f8fbeb..dfa2c5a8e1283c 100644 --- a/lib/tasks/mastodon.rake +++ b/lib/tasks/mastodon.rake @@ -426,7 +426,7 @@ namespace :mastodon do prompt.say "\n" - env['UPDATE_CHECK_URL'] = '' unless prompt.yes?('Do you want Mastodon to periodically check for important updates and notify you? (Recommended)', default: true) + env['UPDATE_CHECK_URL'] = '' unless prompt.yes?('Do you want kmyblue to periodically check for important updates and notify you? (Recommended)', default: true) prompt.say "\n" prompt.say 'This configuration will be written to .env.production' From b3076e6ffc6151994c8c76f907a0dc6ad03e0902 Mon Sep 17 00:00:00 2001 From: KMY Date: Sun, 24 Sep 2023 12:27:28 +0900 Subject: [PATCH 2/3] Fix status is added bookmark category statuses list on bottom when bookmark --- .../mastodon/reducers/bookmark_categories.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/reducers/bookmark_categories.js b/app/javascript/mastodon/reducers/bookmark_categories.js index ea9e4f489569e5..f39e1b4437efd7 100644 --- a/app/javascript/mastodon/reducers/bookmark_categories.js +++ b/app/javascript/mastodon/reducers/bookmark_categories.js @@ -64,6 +64,15 @@ const appendToBookmarkCategoryStatusesById = (state, bookmarkCategoryId, statuse })); }; +const prependToBookmarkCategoryStatusesById = (state, bookmarkCategoryId, statuses) => { + return state.update(bookmarkCategoryId, listMap => listMap.withMutations(map => { + map.set('isLoading', false); + if (map.get('items')) { + map.update('items', list => ImmutableOrderedSet([statuses]).union(list)); + } + })); +}; + const removeStatusFromBookmarkCategoryById = (state, bookmarkCategoryId, status) => { if (state.getIn([bookmarkCategoryId, 'items'])) { return state.updateIn([bookmarkCategoryId, 'items'], items => items.delete(status)); @@ -107,7 +116,7 @@ export default function bookmarkCategories(state = initialState, action) { case BOOKMARK_CATEGORY_STATUSES_EXPAND_SUCCESS: return appendToBookmarkCategoryStatuses(state, action.id, action.statuses, action.next); case BOOKMARK_CATEGORY_EDITOR_ADD_SUCCESS: - return appendToBookmarkCategoryStatusesById(state, action.bookmarkCategoryId, action.statusId, undefined); + return prependToBookmarkCategoryStatusesById(state, action.bookmarkCategoryId, action.statusId); case BOOKMARK_CATEGORY_EDITOR_REMOVE_SUCCESS: return removeStatusFromBookmarkCategoryById(state, action.bookmarkCategoryId, action.statusId); case UNBOOKMARK_SUCCESS: From a8f02d02453928de2ecb908203205b8d995f6fc3 Mon Sep 17 00:00:00 2001 From: KMY Date: Sun, 24 Sep 2023 12:29:52 +0900 Subject: [PATCH 3/3] Remove firefish as misskey fork #16 --- app/lib/activitypub/activity/create.rb | 2 +- app/lib/status_reach_finder.rb | 2 +- .../activitypub/process_account_service.rb | 2 +- app/services/delivery_antenna_service.rb | 7 +--- .../services/delivery_antenna_service_spec.rb | 38 ------------------- 5 files changed, 4 insertions(+), 47 deletions(-) diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index f991faa6a6b039..6b8a7153301d88 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -559,7 +559,7 @@ def misskey_software? info = instance_info return false if info.nil? - %w(misskey calckey firefish).include?(info.software) + %w(misskey calckey).include?(info.software) end def misskey_searchability diff --git a/app/lib/status_reach_finder.rb b/app/lib/status_reach_finder.rb index 7bdc300e1c8660..8639a30a9f661f 100644 --- a/app/lib/status_reach_finder.rb +++ b/app/lib/status_reach_finder.rb @@ -159,7 +159,7 @@ def banned_domains_for_misskey def banned_domains_for_misskey_of_status(status) return [] unless (status.public_unlisted_visibility? && status.account.user&.setting_reject_public_unlisted_subscription) || (status.unlisted_visibility? && status.account.user&.setting_reject_unlisted_subscription) - from_info = InstanceInfo.where(software: %w(misskey calckey firefish)).pluck(:domain) + from_info = InstanceInfo.where(software: %w(misskey calckey)).pluck(:domain) from_domain_block = DomainBlock.where(detect_invalid_subscription: true).pluck(:domain) (from_info + from_domain_block).uniq end diff --git a/app/services/activitypub/process_account_service.rb b/app/services/activitypub/process_account_service.rb index d7859ba92dfa41..18277034cf878f 100644 --- a/app/services/activitypub/process_account_service.rb +++ b/app/services/activitypub/process_account_service.rb @@ -305,7 +305,7 @@ def misskey_software? info = instance_info return false if info.nil? - %w(misskey calckey firefish).include?(info.software) + %w(misskey calckey).include?(info.software) end def subscribable_by diff --git a/app/services/delivery_antenna_service.rb b/app/services/delivery_antenna_service.rb index 53bcc226e7b3ab..3d263219954ac4 100644 --- a/app/services/delivery_antenna_service.rb +++ b/app/services/delivery_antenna_service.rb @@ -121,12 +121,7 @@ def followers_only? when :public, :public_unlisted, :login, :limited false when :unlisted - if @status.local? - !@status.public_searchability? - else - info = InstanceInfo.find_by(domain: @status.account.domain) - info&.software == 'firefish' || !@status.public_searchability? - end + !@status.public_searchability? else true end diff --git a/spec/services/delivery_antenna_service_spec.rb b/spec/services/delivery_antenna_service_spec.rb index e9620dc083bd30..224d448b1af040 100644 --- a/spec/services/delivery_antenna_service_spec.rb +++ b/spec/services/delivery_antenna_service_spec.rb @@ -362,42 +362,4 @@ def list(owner) expect(antenna_feed_of(antenna)).to include status.id end end - - context 'with federated unlisted post' do - let(:visibility) { :unlisted } - let(:searchability) { :public } - let(:domain) { 'fast.example.com' } - let!(:antenna) { antenna_with_keyword(bob, 'body') } - let!(:empty_antenna) { antenna_with_keyword(tom, 'body') } - - context 'when unknown domain' do - let(:software) { nil } - - it 'detecting antenna' do - expect(antenna_feed_of(antenna)).to include status.id - expect(antenna_feed_of(empty_antenna)).to include status.id - end - end - - context 'when misskey domain' do - let(:software) { 'misskey' } - - it 'detecting antenna' do - expect(antenna_feed_of(antenna)).to include status.id - expect(antenna_feed_of(empty_antenna)).to include status.id - end - end - - context 'when firefish domain' do - let(:software) { 'firefish' } - - it 'detecting antenna' do - expect(antenna_feed_of(antenna)).to include status.id - end - - it 'not detecting antenna' do - expect(antenna_feed_of(empty_antenna)).to_not include status.id - end - end - end end