Skip to content

Commit

Permalink
rename the function
Browse files Browse the repository at this point in the history
  • Loading branch information
nkdengineer committed Jun 28, 2024
1 parent 3ddc502 commit 1e803d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libs/actions/Link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ function openLink(href: string, environmentURL: string, isAttachment = false) {
openExternalLink(href);
}

function buildURLWithAuthenToken(url: string, shortLivedAuthToken?: string) {
function buildURLWithAuthToken(url: string, shortLivedAuthToken?: string) {
const authTokenParam = shortLivedAuthToken ? `shortLivedAuthToken=${shortLivedAuthToken}` : '';
const emailParam = `email=${encodeURIComponent(currentUserEmail)}`;
const exitTo = `exitTo=${url}`;
Expand All @@ -179,8 +179,8 @@ function openExternalLinkWithToken(url: string, shouldSkipCustomSafariLogic = fa
asyncOpenURL(
// eslint-disable-next-line rulesdir/no-api-side-effects-method
API.makeRequestWithSideEffects(SIDE_EFFECT_REQUEST_COMMANDS.OPEN_OLD_DOT_LINK, {}, {})
.then((response) => (response ? buildURLWithAuthenToken(url, response.shortLivedAuthToken) : buildURLWithAuthenToken(url)))
.catch(() => buildURLWithAuthenToken(url)),
.then((response) => (response ? buildURLWithAuthToken(url, response.shortLivedAuthToken) : buildURLWithAuthToken(url)))
.catch(() => buildURLWithAuthToken(url)),
(link) => link,
shouldSkipCustomSafariLogic,
);
Expand Down

0 comments on commit 1e803d7

Please sign in to comment.