diff options
author | Quint Guvernator <quint@guvernator.net> | 2018-10-16 13:55:05 -0400 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-10-16 19:55:05 +0200 |
commit | f5e2e96e958e3f9011da932b84af00ae7cefd561 (patch) | |
tree | 5ccd461a00178e6e23c397df34a3e11eac738ac1 /app/services | |
parent | fe9815a462cecbc25397bc0b22231e80a3d7846a (diff) |
always allow DMs from staff (#8993)
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/notify_service.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/services/notify_service.rb b/app/services/notify_service.rb index 63bf8f17a..49022a844 100644 --- a/app/services/notify_service.rb +++ b/app/services/notify_service.rb @@ -59,9 +59,14 @@ class NotifyService < BaseService @notification.target_status.in_reply_to_account_id == @recipient.id && @notification.target_status.thread&.direct_visibility? end + def from_staff? + @notification.from_account.local? && @notification.from_account.user.present? && @notification.from_account.user.staff? + end + def optional_non_following_and_direct? direct_message? && @recipient.user.settings.interactions['must_be_following_dm'] && + !from_staff? && !following_sender? && !response_to_recipient? end |