MS fixed the websocket bug pushing out all updates to single clients. we should get selenium so we can actually test it :(
This commit is contained in:
parent
b780ff0610
commit
892eec1959
3 changed files with 6 additions and 16 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
class DashboardsController < ApplicationController
|
class DashboardsController < ApplicationController
|
||||||
|
|
||||||
before_filter :authenticate_user!, :except => [:receive, :hub]
|
before_filter :authenticate_user!, :except => [:receive, :hub, :host_meta]
|
||||||
include ApplicationHelper
|
include ApplicationHelper
|
||||||
include DashboardsHelper
|
include DashboardsHelper
|
||||||
|
|
||||||
|
|
@ -9,23 +9,11 @@ class DashboardsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def receive
|
def receive
|
||||||
|
|
||||||
puts "SOMEONE JUST SENT ME: #{params[:xml]}"
|
puts "SOMEONE JUST SENT ME: #{params[:xml]}"
|
||||||
|
|
||||||
store_objects_from_xml params[:xml]
|
store_objects_from_xml params[:xml]
|
||||||
render :nothing => true
|
render :nothing => true
|
||||||
end
|
end
|
||||||
|
|
||||||
def hub
|
|
||||||
if params[:mode] == "subscribe"
|
|
||||||
response.status = subscribe(params)
|
|
||||||
end
|
|
||||||
|
|
||||||
render :nothing => true
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def warzombie
|
def warzombie
|
||||||
render :nothing => true
|
render :nothing => true
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ module WebSocket
|
||||||
:debug =>APP_CONFIG[:debug]) do |ws|
|
:debug =>APP_CONFIG[:debug]) do |ws|
|
||||||
ws.onopen {
|
ws.onopen {
|
||||||
@ws = ws
|
@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}
|
ws.onmessage { |msg| SocketsController.new.incoming(msg) }#@channel.push msg; puts msg}
|
||||||
|
|
||||||
|
|
@ -36,7 +36,7 @@ module WebSocket
|
||||||
|
|
||||||
|
|
||||||
def self.subscribe
|
def self.subscribe
|
||||||
@channel.subscribe{ |msg| @ws.send msg }
|
@channel.subscribe{ |msg| ws.send msg }
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,9 @@ Diaspora::Application.routes.draw do |map|
|
||||||
|
|
||||||
resources :users
|
resources :users
|
||||||
match 'receive', :to => 'dashboards#receive'
|
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'
|
root :to => 'dashboards#index'
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue