Merge pull request #2754 from matrix-org/dbkr/hosting_link_only_matrix_org
Only show hosting link if domain == matrix.org
This commit is contained in:
commit
9a57e5c2f6
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue