about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2018-01-15 04:34:28 +0100
committerGitHub <noreply@github.com>2018-01-15 04:34:28 +0100
commited867eca9dbd7d798bc7179dbc13c4f1edc238ad (patch)
treeca8ae2e2a7745fed4d3659e88c16047c97e8d4c3 /app/models
parent08e4c78e78358c2847967e9cc34b4a6497be97e2 (diff)
Move e-mail digest task to sidekiq, reduce workload, improve hint (#6252)
Diffstat (limited to 'app/models')
-rw-r--r--app/models/user.rb4
1 files changed, 4 insertions, 0 deletions
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