Skip to content

Commit

Permalink
Merge pull request #18787 from Expensify/georgia-threadBeta
Browse files Browse the repository at this point in the history
Add betas settings for threads
  • Loading branch information
chiragsalian authored May 11, 2023
2 parents 023ac78 + 07f883d commit 0b4f4e7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/CONST.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ const CONST = {
POLICY_EXPENSE_CHAT: 'policyExpenseChat',
PASSWORDLESS: 'passwordless',
TASKS: 'tasks',
THREADS: 'threads',
},
BUTTON_STATES: {
DEFAULT: 'default',
Expand Down
9 changes: 9 additions & 0 deletions src/libs/Permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ function canUseTasks(betas) {
return _.contains(betas, CONST.BETAS.TASKS) || _.contains(betas, CONST.BETAS.ALL);
}

/**
* @param {Array<String>} betas
* @returns {Boolean}
*/
function canUseThreads(betas) {
return _.contains(betas, CONST.BETAS.THREADS) || canUseAllBetas(betas);
}

export default {
canUseChronos,
canUseIOU,
Expand All @@ -114,4 +122,5 @@ export default {
canUsePolicyExpenseChat,
canUsePasswordlessLogins,
canUseTasks,
canUseThreads,
};

0 comments on commit 0b4f4e7

Please sign in to comment.