diff --git a/.env_sample b/.env_sample index d409b7b41..bfdbefa8a 100644 --- a/.env_sample +++ b/.env_sample @@ -4,7 +4,6 @@ export SKIP_SERVICEWORKERS="true" # App core values export APP_DOMAIN="localhost:3000" export APP_PROTOCOL="http://" -export APP_NAME="forem_local" export FOREM_OWNER_SECRET="secret" # Openresty domain + Protocol setting for development diff --git a/app/models/chat_channel.rb b/app/models/chat_channel.rb index 1d3d18a01..28ba24b37 100644 --- a/app/models/chat_channel.rb +++ b/app/models/chat_channel.rb @@ -112,10 +112,11 @@ class ChatChannel < ApplicationRecord end def pusher_channels + # TODO: use something more unique here (uuid?) rather than just id. if invite_only? - "private-channel--#{ApplicationConfig['APP_NAME']}-#{id}" + "private-channel--#{ApplicationConfig['APP_DOMAIN']}-#{id}" elsif open? - "open-channel--#{ApplicationConfig['APP_NAME']}-#{id}" + "open-channel--#{ApplicationConfig['APP_DOMAIN']}-#{id}" else chat_channel_memberships.pluck(:user_id).map { |id| ChatChannel.pm_notifications_channel(id) } end @@ -165,7 +166,7 @@ class ChatChannel < ApplicationRecord end def self.pm_notifications_channel(user_id) - "private-message-notifications--#{ApplicationConfig['APP_NAME']}-#{user_id}" + "private-message-notifications--#{ApplicationConfig['APP_DOMAIN']}-#{user_id}" end private diff --git a/app/views/shell/_top.html.erb b/app/views/shell/_top.html.erb index c853bc115..115f0996e 100644 --- a/app/views/shell/_top.html.erb +++ b/app/views/shell/_top.html.erb @@ -58,7 +58,7 @@ data-user-status="<%= user_logged_in_status %>" class="<%= SiteConfig.default_font.tr("_", "-") %>-article-body default-header" data-pusher-key="<%= ApplicationConfig["PUSHER_KEY"] %>" - data-app-name="<%= ApplicationConfig["APP_NAME"] %>" + data-app-name="<%= ApplicationConfig["APP_DOMAIN"] %>" data-honeybadger-key="<%= ApplicationConfig["HONEYBADGER_JS_API_KEY"] %>" data-release-footprint="<%= ApplicationConfig["RELEASE_FOOTPRINT"] %>" data-ga-tracking="<%= SiteConfig.ga_tracking_id %>">