diaspora/app/helpers/jsxc_helper.rb
Lukas Matt ea11133084 Include the chat front-end if chat is enabled
* add jsxc helper file
2014-11-13 11:34:21 +01:00

13 lines
349 B
Ruby

module JsxcHelper
def get_bosh_endpoint
port = AppConfig.chat.server.bosh.port
bind = AppConfig.chat.server.bosh.bind
host = AppConfig.pod_uri.host
scheme = AppConfig.pod_uri.scheme
unless AppConfig.chat.server.bosh.proxy?
return "http://#{host}:#{port}#{bind}"
end
return "#{scheme}://#{host}#{bind}"
end
end