Welcome to mirror list, hosted at ThFree Co, Russian Federation.

jsxc_helper.rb « helpers « app - github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d94597d5518b625ecd7ac22a60b8ddd3c2cf0edf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module JsxcHelper
  def get_bosh_endpoint
    proto = AppConfig.chat.server.bosh.proto
    port = AppConfig.chat.server.bosh.port
    bind = AppConfig.chat.server.bosh.bind
    host = AppConfig.pod_uri.host

    unless AppConfig.chat.server.bosh.proxy?
      return "#{proto}://#{host}:#{port}#{bind}"
    end
    AppConfig.url_to bind
  end
end