From 610a6d935a6c92cded5a42cb29f57d541ea98b85 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 6 Mar 2019 10:22:19 +0000 Subject: [PATCH] Only show hosting link if domain == matrix.org Fixes https://github.com/vector-im/riot-web/issues/9059 --- src/utils/HostingLink.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/HostingLink.js b/src/utils/HostingLink.js index 7efd8b6f96..ff1ac3d063 100644 --- a/src/utils/HostingLink.js +++ b/src/utils/HostingLink.js @@ -18,12 +18,15 @@ import url from 'url'; import qs from 'qs'; import SdkConfig from '../SdkConfig'; +import MatrixClientPeg from '../MatrixClientPeg'; export function getHostingLink(campaign) { const hostingLink = SdkConfig.get().hosting_signup_link; if (!hostingLink) return null; if (!campaign) return hostingLink; + if (MatrixClientPeg.get().getDomain() !== 'matrix.org') return null; + try { const hostingUrl = url.parse(hostingLink); const params = qs.parse(hostingUrl.query);