Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authordanielgrippi <danielgrippi@gmail.com>2011-07-08 22:28:17 +0400
committerRaphael Sofaer <raphael@joindiaspora.com>2011-07-12 02:00:48 +0400
commit2e15b6a61e44f0bdd98f7b25473164eb3f38ebae (patch)
tree1e84239fc974411c597b3fa3ddc58bfe6ed762e7 /lib
parente59f49aace4a6e4ad695c5791768a4470be67c49 (diff)
Likes in comments, cache counter disabled for now.
Diffstat (limited to 'lib')
-rw-r--r--lib/diaspora/relayable.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/diaspora/relayable.rb b/lib/diaspora/relayable.rb
index acdd8526d..4ebbae7ce 100644
--- a/lib/diaspora/relayable.rb
+++ b/lib/diaspora/relayable.rb
@@ -69,16 +69,18 @@ module Diaspora
#sign relayable as model creator
self.author_signature = self.sign_with_key(author.owner.encryption_key)
- if !self.post_id.blank? && self.author.owns?(self.parent)
+ if !self.parent.blank? && self.author.owns?(self.parent)
#sign relayable as parent object owner
self.parent_author_signature = sign_with_key(author.owner.encryption_key)
end
end
+ # @return [Boolean]
def verify_parent_author_signature
verify_signature(self.parent_author_signature, self.parent.author)
end
+ # @return [Boolean]
def signature_valid?
verify_signature(self.author_signature, self.author)
end