Skip to content

A platform for community discussion. Free, open, simple.

Fix Twitch onebox multisite issue

Richard22ef6a7c29f6
diff --git a/lib/onebox/mixins/twitch_onebox.rb b/lib/onebox/mixins/twitch_onebox.rb
index ec3bc4a6742..8251bcb17c2 100644
--- a/lib/onebox/mixins/twitch_onebox.rb
+++ b/lib/onebox/mixins/twitch_onebox.rb
@@ -25,7 +25,7 @@ module Onebox
def to_html
<<~HTML
- <iframe src="https://#{base_url}#{query_params}&parent=#{options[:hostname]}&autoplay=false" width="620" height="378" frameborder="0" style="overflow: hidden;" scrolling="no" allowfullscreen="allowfullscreen"></iframe>
+ <iframe src="https://#{base_url}#{query_params}&parent=#{Discourse.current_hostname}&autoplay=false" width="620" height="378" frameborder="0" style="overflow: hidden;" scrolling="no" allowfullscreen="allowfullscreen"></iframe>
HTML
end
end