diaspora/lib/postzord/receiver.rb
Jonne Haß 3fc3b249e7 End the require mess
* Rename and reorganize post fetcher to fix autoloading, also let it use
  Faradays default connection so we get nice redirects
* Add initializer to load libs at a central place
* added lib dir to autoload_once paths to increase thread safety
* Moved lib/exceptions.rb to lib/diaspora/ to conform namespacing
2013-03-21 23:37:53 +01:00

22 lines
646 B
Ruby

# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
class Postzord::Receiver
require 'postzord/receiver/private'
require 'postzord/receiver/public'
require 'postzord/receiver/local_batch'
def perform!
self.receive!
end
def author_does_not_match_xml_author?
if (@author.diaspora_handle != xml_author)
FEDERATION_LOGGER.info("event=receive status=abort reason='author in xml does not match retrieved person' payload_type=#{@object.class} sender=#{@author.diaspora_handle}")
return true
end
end
end