1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-09 10:22:46 +03:00

Add startup() to store API

This commit is contained in:
Kegan Dougal
2017-02-17 10:14:12 +00:00
parent 29336e260c
commit c93c8a79b7
3 changed files with 19 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ limitations under the License.
*/
const utils = require("../utils");
const User = require("../models/user");
const q = require("q");
/**
* Construct a new in-memory data store for the Matrix Client.
@@ -288,4 +289,12 @@ module.exports.MatrixInMemoryStore.prototype = {
getSyncAccumulator: function() {
return null;
},
/**
* Startup does nothing as this store doesn't require starting up.
* @return {Promise} An immediately resolved promise.
*/
startup: function() {
return q();
},
};

View File

@@ -15,6 +15,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
"use strict";
import q from "q";
/**
* This is an internal module.
* @module store/stub
@@ -193,6 +194,14 @@ StubStore.prototype = {
getSyncAccumulator: function() {
return null;
},
/**
* Startup does nothing.
* @return {Promise} An immediately resolved promise.
*/
startup: function() {
return q();
},
};
/** Stub Store class. */