mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:26:54 -06:00
FIX: missing email notifications for group mentions
This commit is contained in:
parent
aa2f802247
commit
1f7c03df5c
@ -57,9 +57,10 @@ module Jobs
|
||||
return skip(skip_reason) if skip_reason
|
||||
|
||||
# Make sure that mailer exists
|
||||
raise Discourse::InvalidParameters.new(:type) unless UserNotifications.respond_to?(args[:type])
|
||||
raise Discourse::InvalidParameters.new("type=#{args[:type]}") unless UserNotifications.respond_to?(args[:type])
|
||||
|
||||
message = UserNotifications.send(args[:type], @user, email_args)
|
||||
|
||||
# Update the to address if we have a custom one
|
||||
if args[:to_address].present?
|
||||
message.to = [args[:to_address]]
|
||||
|
@ -113,6 +113,13 @@ class UserNotifications < ActionMailer::Base
|
||||
notification_email(user, opts)
|
||||
end
|
||||
|
||||
def group_mentioned(user, opts)
|
||||
opts[:allow_reply_by_email] = true
|
||||
opts[:use_site_subject] = true
|
||||
opts[:show_category_in_subject] = true
|
||||
notification_email(user, opts)
|
||||
end
|
||||
|
||||
def user_posted(user, opts)
|
||||
opts[:allow_reply_by_email] = true
|
||||
opts[:use_site_subject] = true
|
||||
|
Loading…
Reference in New Issue
Block a user