Don't send a noification email if somebody comments on their own diary
entry. Fixes #2053.
This commit is contained in:
parent
229e166eb3
commit
f5e14bcc48
1 changed files with 4 additions and 1 deletions
|
@ -54,7 +54,10 @@ class DiaryEntryController < ApplicationController
|
||||||
@diary_comment = @entry.diary_comments.build(params[:diary_comment])
|
@diary_comment = @entry.diary_comments.build(params[:diary_comment])
|
||||||
@diary_comment.user = @user
|
@diary_comment.user = @user
|
||||||
if @diary_comment.save
|
if @diary_comment.save
|
||||||
Notifier::deliver_diary_comment_notification(@diary_comment)
|
if @diary_comment.user != @entry.user
|
||||||
|
Notifier::deliver_diary_comment_notification(@diary_comment)
|
||||||
|
end
|
||||||
|
|
||||||
redirect_to :controller => 'diary_entry', :action => 'view', :display_name => @entry.user.display_name, :id => @entry.id
|
redirect_to :controller => 'diary_entry', :action => 'view', :display_name => @entry.user.display_name, :id => @entry.id
|
||||||
else
|
else
|
||||||
render :action => 'view'
|
render :action => 'view'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue