From c535442059445f44362f577a7d6642b7c0ff835e Mon Sep 17 00:00:00 2001 From: Matt McKegg Date: Tue, 4 Dec 2018 12:14:30 +1300 Subject: [PATCH] support old thread forks for resolving roots --- lib/lookup-roots.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/lookup-roots.js b/lib/lookup-roots.js index 335553429..9098bfe27 100644 --- a/lib/lookup-roots.js +++ b/lib/lookup-roots.js @@ -28,7 +28,8 @@ function getRootMsg (msg, { ssb, cache, visited }, cb) { return cb(null, msg) } else { getThruCache(rootId, { ssb, cache }, (_, root) => { - if (msg.value.content.fork) { + // HACK: the second one (type + root) is for backwards compatibility + if (msg.value.content.fork || (msg.value.content.root && msg.value.content.type === 'post')) { // this message is a forked root return cb(null, root) } else if (visited.has(root.key)) {