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

Add a getAllEndToEndSessions to crypto store #812

Merged
merged 2 commits into from
Jan 3, 2019
Merged

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Dec 21, 2018

So we can migrate them from place to place

So we can migrate them from place to place
@dbkr dbkr requested a review from a team December 21, 2018 19:13
dbkr added a commit to element-hq/element-web that referenced this pull request Dec 21, 2018
App checks at startup for an existing session, if there isn't one,
it will start the tool to check for a login in the file:// origin.
If there is one, it will copy the login over to the vector://vector
origin.

In principle this could also be used to migrate logins between
other origins on the web if this were ever required.

This includes a minified copy of the browserified js-sdk with
a getAllEndToEndSessions() function added to the crypto store
(matrix-org/matrix-js-sdk#812). This is
not great, but for a short-lived tool this seems better than
introducing more entry points into webpack only used for the
electron app.
getReq.onsuccess = function() {
const cursor = getReq.result;
if (cursor) {
func(cursor.value);
Copy link
Member

Choose a reason for hiding this comment

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

:( at no promises

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah - blame indexeddb and its api being entirely callback based and reliant on the transaction ending after the callback is run. :/

@dbkr dbkr merged commit f6c8687 into develop Jan 3, 2019
@t3chguy t3chguy deleted the dbkr/getallsessions branch May 10, 2022 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants