From cab8610beaf7b3b1d12571f47e3beeb77f8962f7 Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 10 Sep 2010 10:38:16 -0700 Subject: [PATCH] Actually use salmon to push comments --- app/models/comment.rb | 10 ---------- app/models/user.rb | 4 ++-- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/app/models/comment.rb b/app/models/comment.rb index 82de5ecdf..1826efd0c 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -22,16 +22,6 @@ class Comment timestamps! - def push_upstream - Rails.logger.info("GOIN UPSTREAM") - push_to([post.person]) - end - - def push_downstream - Rails.logger.info("SWIMMIN DOWNSTREAM") - push_to(post.people_with_permissions) - end - #ENCRYPTION xml_accessor :creator_signature diff --git a/app/models/user.rb b/app/models/user.rb index 21054c020..f1a246d95 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -174,10 +174,10 @@ class User if owns? comment.post comment.post_creator_signature = comment.sign_with_key(encryption_key) comment.save - comment.push_downstream + push_to_people comment, people_in_groups(groups_with_post(comment.post.id)) elsif owns? comment comment.save - comment.push_upstream + salmon comment, :to => comment.post.person end end