Unify wss uri generation.
authorlain <lain@soykaf.club>
Sat, 5 May 2018 11:40:31 +0000 (13:40 +0200)
committerlain <lain@soykaf.club>
Sat, 5 May 2018 11:40:31 +0000 (13:40 +0200)
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex

index 2b4e9e72b2c58fdc6b78b965d214e9618fcc6eff..b77c9fc02f86dedc05fef7a3b3064810aa402cd5 100644 (file)
@@ -112,7 +112,7 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
       version: "#{@mastodon_api_level} (compatible; #{Keyword.get(@instance, :version)})",
       email: Keyword.get(@instance, :email),
       urls: %{
-        streaming_api: String.replace(Web.base_url(), ["http", "https"], "wss")
+        streaming_api: String.replace(Pleroma.Web.Endpoint.static_url(), "http", "ws")
       },
       stats: Stats.get_stats(),
       thumbnail: Web.base_url() <> "/instance/thumbnail.jpeg",