diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-02-23 16:45:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-23 16:45:22 +0100 |
commit | 7b816eb5aeeed61fa1e3a7c95cbb5bb7978f7fa5 (patch) | |
tree | 5888b4ec8bbb68d88c527ec8dada549f4a6c9b77 /app/services/notify_service.rb | |
parent | 3e12abc1fe9b32f69eaf2a8d1edf8bad9622eb4a (diff) |
Add notifications for new sign-ups (#16953)
Diffstat (limited to 'app/services/notify_service.rb')
-rw-r--r-- | app/services/notify_service.rb | 42 |
1 files changed, 7 insertions, 35 deletions
diff --git a/app/services/notify_service.rb b/app/services/notify_service.rb index ab80a7e4b..b1f9fd755 100644 --- a/app/services/notify_service.rb +++ b/app/services/notify_service.rb @@ -22,34 +22,6 @@ class NotifyService < BaseService FeedManager.instance.filter?(:mentions, @notification.mention.status, @recipient) end - def blocked_status? - false - end - - def blocked_favourite? - false - end - - def blocked_follow? - false - end - - def blocked_reblog? - false - end - - def blocked_follow_request? - false - end - - def blocked_poll? - false - end - - def blocked_update? - false - end - def following_sender? return @following_sender if defined?(@following_sender) @following_sender = @recipient.following?(@notification.from_account) || @recipient.requested?(@notification.from_account) @@ -149,15 +121,15 @@ class NotifyService < BaseService return blocked if message? && from_staff? - blocked ||= domain_blocking? # Skip for domain blocked accounts - blocked ||= @recipient.blocking?(@notification.from_account) # Skip for blocked accounts + blocked ||= domain_blocking? + blocked ||= @recipient.blocking?(@notification.from_account) blocked ||= @recipient.muting_notifications?(@notification.from_account) - blocked ||= hellbanned? # Hellban - blocked ||= optional_non_follower? # Options - blocked ||= optional_non_following? # Options - blocked ||= optional_non_following_and_direct? # Options + blocked ||= hellbanned? + blocked ||= optional_non_follower? + blocked ||= optional_non_following? + blocked ||= optional_non_following_and_direct? blocked ||= conversation_muted? - blocked ||= send("blocked_#{@notification.type}?") # Type-dependent filters + blocked ||= blocked_mention? if @notification.type == :mention blocked end |