* Typescriptify & use service worker for MSC3916 authentication
* appease the linter
* appease jest
* appease linter
* Get the access token directly
* Add a bit of jitter
* Improve legibility, use factored-out functions for pickling
* Add docs
* Appease the linter
* Document risks of postMessage
* Split service worker post message handling out to function
* Move registration to async function
* Use more early returns
* Thanks(?), WebStorm
* Handle case of no access token for /versions
* Appease linter
* Apply suggestions from code review
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Remove spurious try/catch
* Factor out fetch config stuff
* Apply suggestions from code review
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* Finish applying code review suggestions
---------
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
* tweak string formatting of default device name
* cheaters path to beating quality gate
* more electronplatform test coverage
* remove test that throw errors
* cover some more window.electrons
* more coverage
* empty line
Remove the hash event listener before reloading the page, as the reload was being swallowed by our router.
Along the way, refactor out routing logic form app.tsx to avoid causing a circular import.
* Centralise version scripts and fix Docker version
* Refactor generation of a git-hash-based version into get-version-from-git
* Refactor normalization of versions (stripping leading v) into normalize-version.sh
* Call get-version-from-git from ci_package.sh, call normalize-version from package.sh
* Refactor docker-write-version.sh into docker-package.sh, which both writes the
version file and invokes yarn build passing VERSION
* Normalize the version received from the server
We need to strip the leading v from the local app version in pollForUpdate to ensure it compares correctly the version from the /version request indicating what the latest available version is. Previously, we only stripped the leading in getAppVersion which is used in some other places but not to decide whether an update is available.
* Fetch version from VERSION set during build
* When polling for new versions, compare to VERSION set during build
* Strip leading v from version, matching package.sh
After a notification arrives, when the user focuses on element, the
notification never goes away (unless directly interacted with), this was a bug.
displayNotification was never returning the notification handle, which means
that matrix-react-sdk later on had no way to .close it.
Closes#16026
Signed-off-by: Alexandru M Stan <alex@hypertriangle.com>