FIX: error when user name was nil

This commit is contained in:
Régis Hanol 2015-05-06 23:56:34 +02:00
parent c89bef2762
commit 52c19d74f8

View file

@ -142,7 +142,7 @@ class UserNotifications < ActionMailer::Base
title: post.topic.title,
post: post,
username: post.user.username,
from_alias: (SiteSetting.enable_names && SiteSetting.display_name_on_posts && !post.user.name.empty?) ? post.user.name : post.user.username,
from_alias: (SiteSetting.enable_names && SiteSetting.display_name_on_posts && post.user.name.present?) ? post.user.name : post.user.username,
allow_reply_by_email: true,
use_site_subject: true,
add_re_to_subject: true,