diff --git a/app/models/comment.rb b/app/models/comment.rb index b77a918f55bf847df321c7416bfb2e3bad0f2f4b..3057b98e4aedaaa0d36c73a07baa09f0c6ce5ef9 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -58,7 +58,6 @@ class Comment end def signature_valid? - return true if person.nil? verify_signature(creator_signature, person) end diff --git a/app/models/user.rb b/app/models/user.rb index e43f44f5112b9f3ec47dab5e7573776637454314..dcb4d3c2f950b3368c56e112625cf0ab1e02359d 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -166,6 +166,8 @@ class User def receive xml object = Diaspora::Parser.from_xml(xml) Rails.logger.debug("Receiving object:\n#{object.inspect}") + Rails.logger.debug("From: #{object.person.inspect}") if object.person + object.person.save if object.is_a? Comment && Person.find_by_id(object.person_id).nil? raise "In receive for #{self.real_name}, signature was not valid on: #{object.inspect}" unless object.signature_valid? if object.is_a? Retraction if object.type == 'Person' && object.signature_valid?