diff --git a/lib/epochs.js b/lib/epochs.js index 4bc0c72..4559976 100644 --- a/lib/epochs.js +++ b/lib/epochs.js @@ -17,10 +17,10 @@ const { and, type, live, + key, isDecrypted, toPullStream, } = require('ssb-db2/operators') -const { seekKey } = require('ssb-db2/seekers') const { validator: { group: { @@ -37,7 +37,6 @@ const isSubsetOf = require('set.prototype.issubsetof') const { groupRecp } = require('./operators') const getTangleUpdates = require('./tangles/get-tangle-updates') const pullMany = require('pull-many') -const { equal } = require('jitdb/operators') const msgPattern = toPattern(new Butt64('ssb:message/[a-zA-Z0-9-]+/', null, 32)) const feedPattern = toPattern(new Butt64('ssb:feed/[a-zA-Z0-9-]+/', null, 32)) @@ -526,15 +525,7 @@ function getRootVal(ssb, msgId, cb) { pull( pullMany([ ssb.db.query( - where( - and( - isDecrypted('box2'), - equal(seekKey, toMessageSigil(msgId), { - indexType: 'groupRootMsgId', - prefix: true, - }) - ) - ), + where(and(isDecrypted('box2'), key(toMessageSigil(msgId)))), live({ old: true }), toPullStream() ),