Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix permission token update, use dialog adapter token for kick #4418

Merged
merged 1 commit into from
Sep 28, 2021

Conversation

yakyouk
Copy link
Contributor

@yakyouk yakyouk commented Jul 16, 2021

Remove event permissions-refreshed that was redundant with permissions_updated.
Simplify permission refresh timer, clear existing timer if permissions are refreshed early.
In hubChannel.kick, do not refetch permissions so as to pass perms token to NAF dialog adapter's kick; instead, use NAF dialog adapter's _joinToken internally.

┆Issue is synchronized with this Jira Task

@yakyouk yakyouk changed the title fix dialog token update, use dialog token for kick fix permission token update, use dialog adapter token for kick Jul 16, 2021
const nextRefresh = new Date(this._permissions.exp * 1000 - 60 * 1000) - new Date();
setTimeout(async () => {
const result = await this.fetchPermissions();
this.dispatchEvent(new CustomEvent("permissions-refreshed", { detail: result }));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fetchPermissions calls setPermissionsFromToken which dispatches permissions_updated so we don't need to dispatch here.

@netpro2k
Copy link
Contributor

netpro2k commented Sep 3, 2021

The adapter code has changed a bit since you submitted this. This change definitely makes sense though. If you are up for updating it that would be great, otherwise just noting here for whichever one of us on the tip picks up this PR

@yakyouk yakyouk force-pushed the f/dialog-token-update branch 3 times, most recently from 40392e2 to 68a1c24 Compare September 4, 2021 17:14
bugfix

Delete naf-dialog-adapter-copy.js

Update hub-channel.js
@yakyouk yakyouk force-pushed the f/dialog-token-update branch from 68a1c24 to db11e3a Compare September 4, 2021 17:37
@yakyouk
Copy link
Contributor Author

yakyouk commented Sep 4, 2021

I updated the change

@netpro2k netpro2k merged commit 2077c3f into Hubs-Foundation:master Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants