Merge pull request #719 from matrix-org/kegan/db-name

Change the name of the database
This commit is contained in:
Kegsay 2017-02-21 17:18:41 +00:00 committed by GitHub
commit 7cbd5a7f07

View file

@ -122,8 +122,11 @@ class MatrixClientPeg {
opts.sessionStore = new Matrix.WebStorageSessionStore(localStorage);
}
if (window.indexedDB && localStorage) {
// FIXME: bodge to remove old database. Remove this after a few weeks.
window.indexedDB.deleteDatabase("matrix-js-sdk:default");
opts.store = new Matrix.IndexedDBStore(
new Matrix.IndexedDBStoreBackend(window.indexedDB),
new Matrix.IndexedDBStoreBackend(window.indexedDB, "riot-web-sync"),
new Matrix.SyncAccumulator(), {
localStorage: localStorage,
}