Skip to content

Commit

Permalink
Discord-RDS linking fix (#609) (#611)
Browse files Browse the repository at this point in the history
* chore: fix spelling mistake

* Fixed condition check for linking account

Co-authored-by: Prakash Choudhary <34452139+prakashchoudhary07@users.noreply.github.com>
  • Loading branch information
vinit717 and prakashchoudhary07 authored Aug 26, 2024
1 parent 3ca27ff commit 055d6e1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/routes/discord.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default class DiscordRoute extends Route {
toastNotificationTimeoutOptions
);

return { isTokenEpired: true };
return { isTokenExpired: true };
}
} catch (error) {
this.toast.error(error.message, '', toastNotificationTimeoutOptions);
Expand Down
16 changes: 14 additions & 2 deletions app/templates/discord.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,19 @@
<Spinner />
</div>
{{else}}
{{#if (and @model.userData.discordId (eq @model.userData.roles.archived false))}}
{{! Added (eq @model.userData.roles.archived false) check for temporary,
For users who have left RDS before and are rejoining again now
This
TODO: 1. fix (eq @model.userData.roles.archived false) after deprecating archived role
2. Remove this check and get a flow in place for users who had left RDS previously and are coming back now
3. fix @model.userData.discordId check, which was removed, get a proper solution in place
}}
{{#if
(or
(eq @model.userData.roles.archived false)
(eq this.linkStatus 'linked')
)
}}
<div class='discord__success'>
<p class='success__text'>Your Discord account has been successfully
linked.</p>
Expand All @@ -20,7 +32,7 @@
<div class='discord__error'>
<p class='error__text'>Something went wrong. Please try again.</p>
</div>
{{else}}
{{else if (eq this.linkStatus 'not-linked')}}
<header class='header horizontal-flex w-100' data-test-header>
<img
src='RDSLogo.png'
Expand Down

0 comments on commit 055d6e1

Please sign in to comment.