load user pins in the database worker
This commit is contained in:
@@ -625,6 +625,8 @@ const handleGetHistoryRange = function (Env, Server, seq, userId, parsed) {
|
||||
Env.Log.error("HK_GET_OLDER_HISTORY", err);
|
||||
}
|
||||
|
||||
if (!Array.isArray(messages)) { messages = []; }
|
||||
|
||||
var toSend = [];
|
||||
if (typeof (desiredMessages) === "number") {
|
||||
toSend = messages.slice(-desiredMessages);
|
||||
@@ -886,6 +888,15 @@ HK.initializeIndexWorkers = function (Env, config, _cb) {
|
||||
});
|
||||
};
|
||||
|
||||
Env.getPinState = function (safeKey, cb) {
|
||||
Env.pinStore.getWeakLock(safeKey, function (next) {
|
||||
sendCommand({
|
||||
key: safeKey,
|
||||
command: 'GET_PIN_STATE',
|
||||
}, Util.both(next, cb));
|
||||
});
|
||||
};
|
||||
|
||||
//console.log("index workers ready");
|
||||
cb(void 0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user