diff --git a/app/models/user.rb b/app/models/user.rb index dab54974..ef11e5f6 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -111,8 +111,14 @@ class User < ApplicationRecord self[:settings] = val end - def mailboxer_email(_object) - nil # email + # Mailboxer hooks and helper functions + + def mailboxer_email(_message) + if emails_allowed + email + else + nil + end end def mailboxer_notifications