Closed nichoth closed 2 years ago
ssb-db2 doesn't use flume. ssb-viewer needs to be fixed to use db2 queries instead.
Now to figure out what is the equivalent query to sbot.links
How does the sbot.links query look like exactly?
It looks like it is line 344 here -- https://github.com/ssbc/ssb-viewer/blob/master/index.js#L344
pull(
sbot.links({dest: id, values: true, rel: 'root' }),
pull.unique('key'),
pull.collect(function (err, links) {
if (err) return respond(res, 500, err.stack || err)
if(includeRoot)
links.unshift(root)
render(links)
})
)
Ah, in that case you could use an approach such as the one I used in ssb-threads (see source code)
Thanks @staltz ! So it looks like ssb-threads
supersedes that call to sbot.links
in the old version of ssb, and I should be installing & using ssb-threads
instead.
Oh yeah, of course, just using ssb-threads
directly is a good alternative, that didn't occur to me.
This is when using the module ssb-viewer -- https://github.com/planetary-social/planetary-pub/blob/main/index.js#L48
The viewer seems to require
sbot.links
, but when I add it, it gives an error:This is when I'm including the
compat
module