diff --git a/app/models/person.rb b/app/models/person.rb index 50a3cc410..827d4945d 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -77,22 +77,21 @@ class Person def send_comment( c ) if self.owner.nil? - if c.post.person.owner.nil? - #puts "The commenter is not here, and neither is the poster" - elsif c.post.person.owner - #puts "The commenter is not here, and the poster is" - c.push_downstream - end - else - if owns? c.post - #puts "The commenter is here, and is the poster" - c.push_downstream - else - #puts "The commenter is here, and is not the poster" - c.push_upstream - end + if c.post.person.owner.nil? + #puts "The commenter is not here, and neither is the poster" + elsif c.post.person.owner + #puts "The commenter is not here, and the poster is" + c.push_downstream end - + else + if owns? c.post + #puts "The commenter is here, and is the poster" + c.push_downstream + else + #puts "The commenter is here, and is not the poster" + c.push_upstream + end + end end ##profile def update_profile(params) diff --git a/app/models/user.rb b/app/models/user.rb index d224cef44..e35ec88cb 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -174,6 +174,7 @@ class User Rails.logger.debug("Saving object: #{object}") object.save object.socket_to_uid( id) if object.respond_to? :socket_to_uid + object.person.send_comment object if object.is_a? Comment end end