Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Defer IM token until widget is shown and permission granted #3240

Merged
merged 1 commit into from
Jul 22, 2019

Conversation

jryans
Copy link
Collaborator

@jryans jryans commented Jul 22, 2019

This defers the work to request the IM token when displaying a widget until
after we know that widget will actually be shown and the user has granted
permission for this widget to be displayed.

This is useful in general to avoid making unnecessary token checks, but it's
particularly helpful with the new Terms API, so that we only show the Terms flow
when widget are actually being used (as opposed to entering the room where
widgets exist, but haven't been shown / permitted).

Part of element-hq/element-web#10088

Note: This part is safe to merge to develop. It does not depend on #3199.

This defers the work to request the IM token when displaying a widget until
after we know that widget will actually be shown and the user has granted
permission for this widget to be displayed.

This is useful in general to avoid making unnecessary token checks, but it's
particularly helpful with the new Terms API, so that we only show the Terms flow
when widget are actually being used (as opposed to entering the room where
widgets exist, but haven't been shown / permitted).

Part of element-hq/element-web#10088
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants