Inspect the friend before calling unfriended by
This commit is contained in:
parent
ad2d8f8b46
commit
0e67ef8d7e
1 changed files with 1 additions and 2 deletions
|
|
@ -139,14 +139,13 @@ class User
|
|||
|
||||
###### Receiving #######
|
||||
def receive xml
|
||||
Rails.logger.info("Received xml is #{xml}")
|
||||
object = Diaspora::Parser.from_xml(xml)
|
||||
Rails.logger.debug("Receiving object:\n#{object.inspect}")
|
||||
|
||||
if object.is_a? Retraction
|
||||
if object.type == 'Person' && object.signature_valid?
|
||||
|
||||
Rails.logger.info( "the person id is #{object.post_id} the friend found is #{friends.first(object.post_id)}")
|
||||
Rails.logger.info( "the person id is #{object.post_id} the friend found is #{friends.first(:id => object.post_id).inspect}")
|
||||
unfriended_by friends.first(:id => object.post_id)
|
||||
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in a new issue