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/app
diff options
context:
space:
mode:
authorRaphael Sofaer <raphael@joindiaspora.com>2011-07-23 00:12:12 +0400
committerRaphael Sofaer <raphael@joindiaspora.com>2011-07-23 00:12:12 +0400
commitad5dba052ca7c2d67e9e7c64ff8d46f84b2ab791 (patch)
tree9e38bf9241f39259a83fe283a37fef33640ae7e5 /app
parent17774d8b3b94ab0f3c6917c65d30552959fa387e (diff)
First reshare retraction spec is green
Diffstat (limited to 'app')
-rw-r--r--app/models/signed_retraction.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/models/signed_retraction.rb b/app/models/signed_retraction.rb
index 75a4e5477..a499c7d87 100644
--- a/app/models/signed_retraction.rb
+++ b/app/models/signed_retraction.rb
@@ -22,7 +22,7 @@ class SignedRetraction
accessors = self.class.roxml_attrs.collect do |definition|
definition.accessor
end
- accessors - ['target_author_signature']
+ accessors - ['target_author_signature', 'sender_handle']
end
def sender_handle= new_sender_handle
@@ -34,7 +34,7 @@ class SignedRetraction
end
def diaspora_handle
- self.target.diaspora_handle
+ self.sender_handle
end
def subscribers(user)
@@ -64,9 +64,10 @@ class SignedRetraction
def perform receiving_user
Rails.logger.debug "Performing retraction for #{target_guid}"
- puts "Performing retraction for #{target_guid}"
if reshare = Reshare.where(:author_id => receiving_user.person.id, :root_id => target.id).first
- Postzord::Dispatch.new(receiving_user, self).post
+ onward_retraction = self.dup
+ onward_retraction.sender = receiving_user.person
+ Postzord::Dispatch.new(receiving_user, onward_retraction).post
end
self.target.unsocket_from_user receiving_user if target.respond_to? :unsocket_from_user
self.target.destroy
@@ -81,7 +82,7 @@ class SignedRetraction
#this is a retraction from the upstream owner
self.perform(recipient)
else
- Rails.logger.info("event=receive status=abort reason='object signature not valid' recipient=#{recipient.diaspora_handle} sender=#{self.parent.author.diaspora_handle} payload_type=#{self.class} parent_id=#{self.parent.id}")
+ Rails.logger.info("event=receive status=abort reason='object signature not valid' recipient=#{recipient.diaspora_handle} sender=#{self.sender_handle} payload_type=#{self.class}")
return
end
self