Skip to content
Extraits de code Groupes Projets
Valider df87b398 rédigé par Maxwell Salzberg's avatar Maxwell Salzberg
Parcourir les fichiers

MS DG; fixed cucumber

parent 10df8ef2
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -12,6 +12,8 @@ class RelayableRetraction < SignedRetraction
super - ['parent_author_signature']
end
# @param sender [User]
# @param target [Object]
def self.build(sender, target)
retraction = super
retraction.parent_author_signature = retraction.sign_with_key(sender.encryption_key) if defined?(target.parent) && sender.person == target.parent.author
......@@ -26,6 +28,10 @@ class RelayableRetraction < SignedRetraction
self.sender_handle
end
def relayable?
true
end
def receive(recipient, sender)
if self.target.nil?
Rails.logger.info("event=retraction status=abort reason='no post found' sender=#{sender.diaspora_handle} target_guid=#{target_guid}")
......
......@@ -18,6 +18,10 @@ class SignedRetraction
:target_author_signature,
:sender
def author
sender.person
end
def signable_accessors
accessors = self.class.roxml_attrs.collect do |definition|
definition.accessor
......
......@@ -16,6 +16,7 @@ if AppConfig.single_process_mode?
klass.send(:perform, *args)
rescue Exception => e
Rails.logger.warn(e.message)
raise e
nil
end
end
......
......@@ -50,11 +50,5 @@ module Diaspora
(self.send accessor.to_sym).to_s
}.join(';')
end
# @abstract
# @return [String]
#def signable_string
# raise NotImplementedError.new("Implement this in your encryptable class")
#end
end
end
......@@ -119,7 +119,9 @@ class Postzord::Dispatcher::Private
# @param services [Array<User>]
def notify_users(users)
Resque.enqueue(Job::NotifyLocalUsers, users.map{|u| u.id}, @object.class.to_s, @object.id, @object.author.id)
if @object.respond_to?(:persisted?)
Resque.enqueue(Job::NotifyLocalUsers, users.map{|u| u.id}, @object.class.to_s, @object.id, @object.author.id)
end
end
# @param services [Array<User>]
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter