From e4ca9f01e207f1375b6e55e35641dcf425c6cb56 Mon Sep 17 00:00:00 2001 From: Benjamin Neff Date: Sat, 11 Jul 2015 03:14:12 +0200 Subject: [PATCH] fix jsxc_helper_spec and use new url_to in jsxc_helper closes #6151 --- Changelog.md | 1 + app/helpers/jsxc_helper.rb | 3 +-- spec/helpers/jsxc_helper_spec.rb | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changelog.md b/Changelog.md index e0ddba10b..48d4659ab 100644 --- a/Changelog.md +++ b/Changelog.md @@ -5,6 +5,7 @@ * Remove top margin for first heading in a post [#6110](https://github.com/diaspora/diaspora/pull/6110) * Add link to pod statistics in right navigation [#6117](https://github.com/diaspora/diaspora/pull/6117) * Refactor person related URL generation [#6168](https://github.com/diaspora/diaspora/pull/6168) +* Move webfinger and HCard generation out of the core and embed the `diaspora_federation-rails` gem [#6151](https://github.com/diaspora/diaspora/pull/6151/) ## Bug fixes * Precompile facebox images [#6105](https://github.com/diaspora/diaspora/pull/6105) diff --git a/app/helpers/jsxc_helper.rb b/app/helpers/jsxc_helper.rb index 168faf0ed..222763529 100644 --- a/app/helpers/jsxc_helper.rb +++ b/app/helpers/jsxc_helper.rb @@ -3,11 +3,10 @@ module JsxcHelper 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}" + AppConfig.url_to bind end end diff --git a/spec/helpers/jsxc_helper_spec.rb b/spec/helpers/jsxc_helper_spec.rb index 014e2f0b6..d38a72bc4 100644 --- a/spec/helpers/jsxc_helper_spec.rb +++ b/spec/helpers/jsxc_helper_spec.rb @@ -6,6 +6,7 @@ describe JsxcHelper, :type => :helper do AppConfig.chat.server.bosh.port = 1234 AppConfig.chat.server.bosh.bind = '/bind' AppConfig.environment.url = "https://localhost/" + AppConfig.instance_variable_set(:@pod_uri, nil) end describe "#get_bosh_endpoint" do