diff --git a/keyserver/src/responders/website-responders.js b/keyserver/src/responders/website-responders.js --- a/keyserver/src/responders/website-responders.js +++ b/keyserver/src/responders/website-responders.js @@ -453,18 +453,101 @@ const { secret } = req.params; const userAgent = req.get('User-Agent'); const detectionResult = detectBrowser(userAgent); - let redirectUrl = stores.appStoreUrl; if (detectionResult.os === 'Android OS') { const isSecretValid = inviteSecretRegex.test(secret); const referrer = isSecretValid ? `&referrer=${encodeURIComponent(`utm_source=invite/${secret}`)}` : ''; - redirectUrl = `${stores.googlePlayUrl}${referrer}`; + const redirectUrl = `${stores.googlePlayUrl}${referrer}`; + res.writeHead(301, { + Location: redirectUrl, + }); + res.end(); + } else { + res.end(html` + +
+ ++ To join this community, download the Comm app and reopen this + invite link +
+