Save the person on receiving a comment
This commit is contained in:
parent
6a48c07c90
commit
31f79be068
2 changed files with 2 additions and 1 deletions
|
|
@ -58,7 +58,6 @@ class Comment
|
|||
end
|
||||
|
||||
def signature_valid?
|
||||
return true if person.nil?
|
||||
verify_signature(creator_signature, person)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -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?
|
||||
|
|
|
|||
Loading…
Reference in a new issue