소스 검색

always allow DMs from staff (#8993)

master
Quint Guvernator 5 년 전
committed by Eugen Rochko
부모
커밋
f5e2e96e95
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. +5
    -0
      app/services/notify_service.rb

+ 5
- 0
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


불러오는 중...
취소
저장