mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Show inviter name in email's from field (#13141)
'From' field of the email contained the name of the user who posted the shared post. Instead, it should contain the name of the inviter.
This commit is contained in:
@@ -422,7 +422,7 @@ class UserNotifications < ActionMailer::Base
|
||||
user_name = notification_data[:original_username]
|
||||
|
||||
if post && SiteSetting.enable_names && SiteSetting.display_name_on_email_from
|
||||
name = User.where(id: post.user_id).pluck_first(:name)
|
||||
name = User.where(id: notification_data[:original_user_id] || post.user_id).pluck_first(:name)
|
||||
user_name = name unless name.blank?
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user