Actually use salmon to push comments
This commit is contained in:
parent
aa1f3c6438
commit
cab8610bea
2 changed files with 2 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue