mirror of
https://github.com/mistergibson/gxg-server.git
synced 2026-08-15 02:15:59 -07:00
federation fixes
This commit is contained in:
parent
342635e967
commit
19f4a1b3f2
2 changed files with 14 additions and 1 deletions
|
|
@ -223,6 +223,19 @@ class WebSocketListener
|
|||
if op_frame[:payload]
|
||||
the_channel.send_message(::GxG::Events::Message::import(JSON.parse(op_frame[:payload].to_s.decode64.decrypt(the_secret), {:symbolize_names => true})))
|
||||
end
|
||||
if op_frame[:open_channel]
|
||||
unless ::GxG::CHANNELS.fetch_channel(op_frame[:open_channel].to_s.to_sym)
|
||||
::GxG::CHANNELS.create_channel(op_frame[:open_channel].to_s.to_sym)
|
||||
new_channel = ::GxG::CHANNELS.fetch_channel(op_frame[:open_channel].to_s.to_sym)
|
||||
if new_channel
|
||||
new_channel.socket = the_channel.socket
|
||||
new_channel.secret = the_channel.secret
|
||||
end
|
||||
end
|
||||
end
|
||||
if op_frame[:close_channel]
|
||||
::GxG::CHANNELS.destroy_channel(op_frame[:close_channel].to_s.to_sym)
|
||||
end
|
||||
else
|
||||
end
|
||||
# if the_type == :text
|
||||
|
|
|
|||
|
|
@ -976,7 +976,7 @@ module GxGwww
|
|||
raise "Invalid Remote ID."
|
||||
end
|
||||
# Federation
|
||||
the_channel = ::GxG::CHANNELS.create_channel(remote_uuid)
|
||||
# the_channel = ::GxG::CHANNELS.create_channel(remote_uuid)
|
||||
# ???
|
||||
# xxx
|
||||
unless the_display
|
||||
|
|
|
|||
Loading…
Reference in a new issue