diff --git a/app/controllers/dashboards_controller.rb b/app/controllers/dashboards_controller.rb index 654f9af6f..8c814db5e 100644 --- a/app/controllers/dashboards_controller.rb +++ b/app/controllers/dashboards_controller.rb @@ -1,6 +1,6 @@ class DashboardsController < ApplicationController - before_filter :authenticate_user!, :except => [:receive, :hub] + before_filter :authenticate_user!, :except => [:receive, :hub, :host_meta] include ApplicationHelper include DashboardsHelper @@ -9,23 +9,11 @@ class DashboardsController < ApplicationController end def receive - puts "SOMEONE JUST SENT ME: #{params[:xml]}" - store_objects_from_xml params[:xml] render :nothing => true end - def hub - if params[:mode] == "subscribe" - response.status = subscribe(params) - end - - render :nothing => true - end - - - def warzombie render :nothing => true diff --git a/config/initializers/socket.rb b/config/initializers/socket.rb index 4651335a0..2f873be23 100644 --- a/config/initializers/socket.rb +++ b/config/initializers/socket.rb @@ -13,7 +13,7 @@ module WebSocket :debug =>APP_CONFIG[:debug]) do |ws| ws.onopen { @ws = ws - sid = SocketsController.new.new_subscriber + sid = @channel.subscribe{ |msg| ws.send msg }#SocketsController.new.new_subscriber ws.onmessage { |msg| SocketsController.new.incoming(msg) }#@channel.push msg; puts msg} @@ -36,7 +36,7 @@ module WebSocket def self.subscribe - @channel.subscribe{ |msg| @ws.send msg } + @channel.subscribe{ |msg| ws.send msg } end end diff --git a/config/routes.rb b/config/routes.rb index 64cea07b0..d59627301 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -18,7 +18,9 @@ Diaspora::Application.routes.draw do |map| resources :users match 'receive', :to => 'dashboards#receive' - match 'hub', :to => 'dashboards#hub' + match 'hub', :to => 'publics#hub' + match '.well-known/host-meta', :to => 'publics#host_meta' + match 'webfinger', :to => 'publics#webfinger' root :to => 'dashboards#index' end