diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-07-05 09:33:44 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-07-05 09:33:44 +0200 |
commit | 92c06a111397e7f9da44db9942f61fd06e03b557 (patch) | |
tree | 310b3d0f6c7f161dbcb68aa907bda4562dddd3d8 /app/services | |
parent | 7cc76b823ab4dfeca684051a99dba8ea4ce1a8fc (diff) | |
parent | 44b2ee3485ba0845e5910cefcb4b1e2f84f34470 (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `app/controllers/admin/base_controller.rb`: Minor conflict caused by glitch-soc's theming system. - `app/javascript/mastodon/initial_state.js`: Minor conflict caused by glitch-soc making use of max_toot_chars. - `app/models/form/admin_settings.rb`: Minor conflict caused by glitch-soc's theming system. - `app/models/trends.rb`: Minor conflict caused by glitch-soc having more granular notification settings for trends. - `app/views/admin/accounts/index.html.haml`: Minor conflict caused by glitch-soc's theming system. - `app/views/admin/instances/show.html.haml`: Minor conflict caused by glitch-soc's theming system. - `app/views/layouts/application.html.haml`: Minor conflict caused by glitch-soc's theming system. - `app/views/settings/preferences/notifications/show.html.haml`: Minor conflict caused by glitch-soc having more granular notification settings for trends. - `config/navigation.rb`: Minor conflict caused by glitch-soc having additional navigation items for the theming system while upstream slightly changed every line.
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/account_search_service.rb | 4 | ||||
-rw-r--r-- | app/services/appeal_service.rb | 2 | ||||
-rw-r--r-- | app/services/bootstrap_timeline_service.rb | 2 | ||||
-rw-r--r-- | app/services/notify_service.rb | 2 | ||||
-rw-r--r-- | app/services/report_service.rb | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/app/services/account_search_service.rb b/app/services/account_search_service.rb index 6fe4b6593..4dcae20eb 100644 --- a/app/services/account_search_service.rb +++ b/app/services/account_search_service.rb @@ -61,11 +61,11 @@ class AccountSearchService < BaseService end def advanced_search_results - Account.advanced_search_for(terms_for_query, account, limit_for_non_exact_results, options[:following], offset) + Account.advanced_search_for(terms_for_query, account, limit: limit_for_non_exact_results, following: options[:following], offset: offset) end def simple_search_results - Account.search_for(terms_for_query, limit_for_non_exact_results, offset) + Account.search_for(terms_for_query, limit: limit_for_non_exact_results, offset: offset) end def from_elasticsearch diff --git a/app/services/appeal_service.rb b/app/services/appeal_service.rb index cef9be05f..399a053d6 100644 --- a/app/services/appeal_service.rb +++ b/app/services/appeal_service.rb @@ -22,7 +22,7 @@ class AppealService < BaseService end def notify_staff! - User.staff.includes(:account).each do |u| + User.those_who_can(:manage_appeals).includes(:account).each do |u| AdminMailer.new_appeal(u.account, @appeal).deliver_later if u.allows_appeal_emails? end end diff --git a/app/services/bootstrap_timeline_service.rb b/app/services/bootstrap_timeline_service.rb index a02e55a6d..126c0fa2e 100644 --- a/app/services/bootstrap_timeline_service.rb +++ b/app/services/bootstrap_timeline_service.rb @@ -17,7 +17,7 @@ class BootstrapTimelineService < BaseService end def notify_staff! - User.staff.includes(:account).find_each do |user| + User.those_who_can(:manage_users).includes(:account).find_each do |user| LocalNotificationWorker.perform_async(user.account_id, @source_account.id, 'Account', 'admin.sign_up') end end diff --git a/app/services/notify_service.rb b/app/services/notify_service.rb index d30b33876..c7454fc60 100644 --- a/app/services/notify_service.rb +++ b/app/services/notify_service.rb @@ -76,7 +76,7 @@ class NotifyService < BaseService end def from_staff? - @notification.from_account.local? && @notification.from_account.user.present? && @notification.from_account.user.staff? + @notification.from_account.local? && @notification.from_account.user.present? && @notification.from_account.user_role&.overrides?(@recipient.user_role) end def optional_non_following_and_direct? diff --git a/app/services/report_service.rb b/app/services/report_service.rb index bd67ff8d3..8c92cf334 100644 --- a/app/services/report_service.rb +++ b/app/services/report_service.rb @@ -38,7 +38,7 @@ class ReportService < BaseService def notify_staff! return if @report.unresolved_siblings? - User.staff.includes(:account).each do |u| + User.those_who_can(:manage_reports).includes(:account).each do |u| LocalNotificationWorker.perform_async(u.account_id, @report.id, 'Report', 'admin.report') AdminMailer.new_report(u.account, @report).deliver_later if u.allows_report_emails? end |