diff options
author | francis <francis> | 2008-11-17 17:08:33 +0000 |
---|---|---|
committer | francis <francis> | 2008-11-17 17:08:33 +0000 |
commit | 85b33fcd27fa9fe6f7d94b1974ac4983d7f4d968 (patch) | |
tree | 00e531d530882cf6145bd10bfb447e86272139c4 /app/controllers/comment_controller.rb | |
parent | 888cccd23f968af989954a643230ff10ef6c87cb (diff) |
Don't subscribe you to your own requests taht you annotate.
Diffstat (limited to 'app/controllers/comment_controller.rb')
-rw-r--r-- | app/controllers/comment_controller.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/comment_controller.rb b/app/controllers/comment_controller.rb index d61d91dfe..26c475569 100644 --- a/app/controllers/comment_controller.rb +++ b/app/controllers/comment_controller.rb @@ -4,7 +4,7 @@ # Copyright (c) 2008 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: comment_controller.rb,v 1.7 2008-11-17 17:01:24 francis Exp $ +# $Id: comment_controller.rb,v 1.8 2008-11-17 17:08:33 francis Exp $ class CommentController < ApplicationController @@ -54,7 +54,9 @@ class CommentController < ApplicationController if params[:subscribe_to_request] @track_thing = TrackThing.create_track_for_request(@info_request) @existing_track = TrackThing.find_by_existing_track(@user, @track_thing) - if !@existing_track + if @user && @info_request.user == @user + # don't subscribe to own request! + elsif !@existing_track @track_thing.track_medium = 'email_daily' @track_thing.tracking_user_id = @user.id @track_thing.save! |