Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
support old thread forks for resolving roots
Browse files Browse the repository at this point in the history
  • Loading branch information
mmckegg committed Dec 3, 2018
1 parent 150454d commit c535442
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/lookup-roots.js
Expand Up @@ -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)) {
Expand Down

0 comments on commit c535442

Please sign in to comment.