Class: DiasporaFederation::ReceiveController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- DiasporaFederation::ReceiveController
- Defined in:
- app/controllers/diaspora_federation/receive_controller.rb
Overview
This controller processes receiving messages.
Instance Method Summary collapse
-
#private ⇒ Object
Receives private messages for a user.
-
#public ⇒ Object
Receives public messages.
Methods inherited from ApplicationController
Instance Method Details
#private ⇒ Object
Receives private messages for a user
POST /receive/users/:guid
25 26 27 28 29 30 31 32 |
# File 'app/controllers/diaspora_federation/receive_controller.rb', line 25 def private data = request.body.read logger.debug data success = DiasporaFederation.callbacks.trigger(:queue_private_receive, params[:guid], data) head success ? :accepted : :not_found end |
#public ⇒ Object
Receives public messages
POST /receive/public
13 14 15 16 17 18 19 20 |
# File 'app/controllers/diaspora_federation/receive_controller.rb', line 13 def public data = request.body.read logger.debug data DiasporaFederation.callbacks.trigger(:queue_public_receive, data) head :accepted end |