diff options
author | danielgrippi <danielgrippi@gmail.com> | 2011-07-08 22:28:17 +0400 |
---|---|---|
committer | Raphael Sofaer <raphael@joindiaspora.com> | 2011-07-12 02:00:48 +0400 |
commit | 2e15b6a61e44f0bdd98f7b25473164eb3f38ebae (patch) | |
tree | 1e84239fc974411c597b3fa3ddc58bfe6ed762e7 /lib | |
parent | e59f49aace4a6e4ad695c5791768a4470be67c49 (diff) |
Likes in comments, cache counter disabled for now.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/diaspora/relayable.rb | 4 |
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 |