diff --git a/lib/plugin.js b/lib/plugin.js index e171236..ee9a94a 100644 --- a/lib/plugin.js +++ b/lib/plugin.js @@ -168,9 +168,12 @@ exports.init = function initDB(peer, config) { } function getFeedRoot(findWho, findType) { + const findWho_ = findWho.startsWith('ppppp:feed/v1/') + ? findWho.substring(16) + : findWho for (const rec of records()) { const { who, type, tangles } = rec.msg.metadata - if (who === findWho && type === findType && isEmptyObject(tangles)) { + if (who === findWho_ && type === findType && isEmptyObject(tangles)) { return rec.hash } } @@ -318,6 +321,7 @@ exports.init = function initDB(peer, config) { records, getRecord, get, + getFeedRoot, // internal findEncryptionFormatFor,