Skip to content
Extraits de code Groupes Projets
Valider 0fc5f1c0 rédigé par MrZYX's avatar MrZYX
Parcourir les fichiers

log the 'received comment but no corresponding post' case

parent 1adcc4cc
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -70,6 +70,11 @@ module Postzord ...@@ -70,6 +70,11 @@ module Postzord
@object.sender_handle = @sender.diaspora_handle @object.sender_handle = @sender.diaspora_handle
end end
# abort if we haven't received the post to a comment
if @object.is_a?(Comment) && @object.post.nil?
Rails.logger.info("event=receive status=abort reason='received a comment but no corresponding post' recipient=#{@user_person.diaspora_handle} sender=#{@sender.diaspora_handle} payload_type=#{@object.class})")
return false
end
if (@author.diaspora_handle != xml_author) if (@author.diaspora_handle != xml_author)
Rails.logger.info("event=receive status=abort reason='author in xml does not match retrieved person' payload_type=#{@object.class} recipient=#{@user_person.diaspora_handle} sender=#{@sender.diaspora_handle}") Rails.logger.info("event=receive status=abort reason='author in xml does not match retrieved person' payload_type=#{@object.class} recipient=#{@user_person.diaspora_handle} sender=#{@sender.diaspora_handle}")
......
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