lock minecraft account linking behind a flag
This commit is contained in:
parent
e18b6ee11d
commit
fb721481e7
1 changed files with 2 additions and 1 deletions
|
@ -22,6 +22,7 @@ const messageTypes = {
|
|||
READY: 2,
|
||||
EVENT: 3
|
||||
};
|
||||
const EXPRIMENTAL_ACCOUNT_LINK = false;
|
||||
|
||||
const chatMessageRegex = /^\[(?:.*?)\]: \<(?<username>[a-zA-Z0-9]+)\> (?<message>.*)/;
|
||||
const joinNotificationRegex = /^\[(?:.*?)\]: (?<username>[a-zA-Z0-9]+) joined the game/;
|
||||
|
@ -263,7 +264,7 @@ async function main() {
|
|||
|
||||
const messageResult = chatMessageRegex.exec(stringData);
|
||||
if (messageResult) {
|
||||
if (messageResult.groups.message === "!:minecraft-link") {
|
||||
if (EXPRIMENTAL_ACCOUNT_LINK && messageResult.groups.message === "!:minecraft-link") {
|
||||
try {
|
||||
const handoffToken = await startHandoffForUser(messageResult.groups.username);
|
||||
const handoffLink = `${FRONTEND_ORIGIN}#token_handoff,,${handoffToken}`;
|
||||
|
|
Loading…
Reference in a new issue