mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: error when group_in_subject enabled but no group in pm
This commit is contained in:
@@ -435,13 +435,11 @@ class UserNotifications < ActionMailer::Base
|
||||
|
||||
if post.topic.private_message?
|
||||
subject_pm =
|
||||
if opts[:show_group_in_subject]
|
||||
if group = post.topic.allowed_groups&.first
|
||||
if group.full_name
|
||||
"[#{group.full_name}] "
|
||||
else
|
||||
"[#{group.name}] "
|
||||
end
|
||||
if opts[:show_group_in_subject] and group = post.topic.allowed_groups&.first
|
||||
if group.full_name
|
||||
"[#{group.full_name}] "
|
||||
else
|
||||
"[#{group.name}] "
|
||||
end
|
||||
else
|
||||
I18n.t('subject_pm')
|
||||
|
||||
Reference in New Issue
Block a user