diff --git a/src/components/structures/UserMenu.tsx b/src/components/structures/UserMenu.tsx index af6b7b762f..d92b233c52 100644 --- a/src/components/structures/UserMenu.tsx +++ b/src/components/structures/UserMenu.tsx @@ -315,12 +315,19 @@ export default class UserMenu extends React.Component { const hostingSignupIFrame = SdkConfig.get().hosting_signup_iframe; let hostingIFrame; if (hostingSignupIFrame) { - hostingIFrame =
- -
; + // If hosting_signup_domains is set to a non-empty array, only show + // dialog if the user is on the domain or a subdomain. + const hostingSignupDomains = SdkConfig.get().hosting_signup_domains || []; + const mxDomain = MatrixClientPeg.get().getDomain(); + const validDomains = hostingSignupDomains.filter(d => (d === mxDomain || mxDomain.endsWith(`.${d}`))); + if (!hostingSignupDomains || validDomains.length > 0) { + hostingIFrame =
+ +
; + } } let homeButton = null;