Merge commit '670e4655d13975e0597bd1c74ebeeeeffc4edc37' into glitch-soc/merge-upstream

This commit is contained in:
Claire
2024-08-07 19:22:25 +02:00
123 changed files with 253 additions and 135 deletions

View File

@@ -0,0 +1,8 @@
# frozen_string_literal: true
class DismissNotificationRequestService < BaseService
def call(request)
FilteredNotificationCleanupWorker.perform_async(request.account_id, request.from_account_id)
request.destroy!
end
end

View File

@@ -48,7 +48,7 @@ class NotifyService < BaseService
end
def from_staff?
@sender.local? && @sender.user.present? && @sender.user_role&.overrides?(@recipient.user_role)
@sender.local? && @sender.user.present? && @sender.user_role&.overrides?(@recipient.user_role) && @sender.user_role&.highlighted? && @sender.user_role&.can?(*UserRole::Flags::CATEGORIES[:moderation])
end
def from_self?