element-web-Github/src/hooks
David Baker 67cb8b7590
Force verification even for refreshed clients (#44)
* Force verification even for refreshed cients

Set a flag on login to remember that the device needs to be verified
so that we don't forget if the user refreshes the page, but still allow
user with an existing unverified session to stay logged in.

* Hopefully make matrixchat tests pass?

Much, much tweaking to make the matrixchat tests pass again. Should
hopefully make them a bit more solid in general with judicious use of
waitFor rather than flushPromises(). Also lots of fun to stop the state
bleeding between tests.

* Manual yarn.lock manipulation

to hopefully resolve infinite package sadness

* Make final test pass(?)

Mock out the createClient method to return the same client, because
we've mocked the peg to always return that client, so if we let the
code make another one having still overridden the peg, everything becomes
cursed.

Also mock out the autodiscovery stuff rather than relying on fetch-mock.

* another waitFor

* death to flushPromises

* Put the logged in dispatch back

Actually it breaks all sorts of other things too, having fixed all the
MatrixChat tests (although this is useful anyway).

* Try displaying the screen in onClientStarted instead

* Put post login screen back in logged in

but move ready transition to avoid flash of main UI

* Rejig more in the hope it does the right thing

* Make hook work before push rules are fetched

* Add test for unskippable verification

* Add test for use case selection

* Fix test

* Add playwright test for unskippable verification

* Remove console log

* Add log message to log line

* Add tsdoc

* Use useTypedEventEmitter

* Remove commented code

* Use catch instead of empty then on unawaited promises

or in one case just await it because the caller was async anyway

* Add new mock
2024-10-03 08:55:06 +00:00
..
room Allow joining calls and video rooms without enabling the labs flags (#95) 2024-09-30 14:07:53 +00:00
spotlight Change license (#13) 2024-09-09 13:57:16 +00:00
useAccountData.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useAnimation.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useAsyncMemo.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useAsyncRefreshMemo.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useAudioDeviceSelection.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useCall.ts Remove legacy room header and promote beta room header (#105) 2024-10-02 12:10:58 +00:00
useDispatcher.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useEncryptionStatus.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useEventEmitter.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useFocus.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useGlobalNotificationState.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useHover.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useIsEncrypted.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useIsInitialSyncComplete.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useIsReleaseAnnouncementOpen.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useLatestResult.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useLocalEcho.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useLocalStorageState.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useNotificationSettings.tsx Change license (#13) 2024-09-09 13:57:16 +00:00
usePermalink.ts Change license (#13) 2024-09-09 13:57:16 +00:00
usePermalinkEvent.ts Change license (#13) 2024-09-09 13:57:16 +00:00
usePermalinkMember.ts Change license (#13) 2024-09-09 13:57:16 +00:00
usePermalinkTargetRoom.ts Change license (#13) 2024-09-09 13:57:16 +00:00
usePinnedEvents.ts Fix huge usage bandwidth and performance issue of pinned message banner. (#37) 2024-09-13 07:47:22 +00:00
useProfileInfo.ts Change license (#13) 2024-09-09 13:57:16 +00:00
usePublicRoomDirectory.ts Change license (#13) 2024-09-09 13:57:16 +00:00
usePushers.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useRoomMembers.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useRoomName.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useRoomNotificationState.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useRoomState.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useSettings.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useSlidingSyncRoomSearch.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useSmoothAnimation.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useSpaceResults.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useStateArray.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useStateCallback.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useStateToggle.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useTheme.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useThreepids.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useTimeout.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useTimeoutToggle.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useTransition.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useUnreadNotifications.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useUserDirectory.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useUserOnboardingContext.ts Force verification even for refreshed clients (#44) 2024-10-03 08:55:06 +00:00
useUserOnboardingTasks.ts Change license (#13) 2024-09-09 13:57:16 +00:00
useUserTimezone.ts Fix timeout type (#40) 2024-09-13 13:15:10 +00:00
useWindowWidth.ts Change license (#13) 2024-09-09 13:57:16 +00:00