X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/be57524849c240856ceeffa9ea02340ba6057710..581c243e0ec43dab9cbff2dc9d36d8c17f057286:/app/controllers/diary_entry_controller.rb diff --git a/app/controllers/diary_entry_controller.rb b/app/controllers/diary_entry_controller.rb index 7a442ac58..48cdda8a0 100644 --- a/app/controllers/diary_entry_controller.rb +++ b/app/controllers/diary_entry_controller.rb @@ -54,7 +54,10 @@ class DiaryEntryController < ApplicationController @diary_comment = @entry.diary_comments.build(params[:diary_comment]) @diary_comment.user = @user 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 else render :action => 'view'