From ed867eca9dbd7d798bc7179dbc13c4f1edc238ad Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 15 Jan 2018 04:34:28 +0100 Subject: Move e-mail digest task to sidekiq, reduce workload, improve hint (#6252) --- app/models/user.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/models') diff --git a/app/models/user.rb b/app/models/user.rb index 9459db7fe..892a07bba 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -170,6 +170,10 @@ class User < ApplicationRecord settings.default_privacy || (account.locked? ? 'private' : 'public') end + def allows_digest_emails? + settings.notification_emails['digest'] + end + def token_for_app(a) return nil if a.nil? || a.owner != self Doorkeeper::AccessToken -- cgit