Commit b839459a364b4958a0753900ed739cfe08711ec8
Show how to stream a thread
cel committed on 4/20/2019, 9:40:07 PMParent: 2a1adb5f93a56a829588f47c4f36cba1a964d590
Files changed
tmpl/docs/advanced/links.md | changed |
tmpl/docs/advanced/post-threads.md | changed |
tmpl/docs/advanced/links.md | |||
---|---|---|---|
@@ -118,11 +118,4 @@ | |||
118 | 118 … | }), | |
119 | 119 … | pull.drain(...) | |
120 | 120 … | ) | |
121 | 121 … | ``` | |
122 | - | ||
123 | ---- | ||
124 | - | ||
125 | -A common pattern is to recursively fetch the links that point to a message, creating a tree. | ||
126 | -This is useful for creating comment-threads, for instance. | ||
127 | - | ||
128 | -You can do that easily in scuttlebot with ..? |
tmpl/docs/advanced/post-threads.md | ||
---|---|---|
@@ -1,16 +1,12 @@ | ||
1 | 1 … | ## Full post-thread |
2 | 2 … | |
3 | -> TODO figure out best api to relace this | |
4 | - | |
5 | 3 … | ```js |
6 | 4 … | pull( |
7 | -sbot.links2({ id: messageId }, function (err, thread) { | |
8 | -}) | |
5 … | + sbot.links({ values: true, rel: 'root', dest: messageId }), | |
6 … | + pull.collect(function (err, msgs) { ... }) | |
7 … | +} | |
9 | 8 … | ``` |
10 | 9 … | |
11 | 10 … | ```bash |
12 | -sbot links2.read --todo-some-query-magick | |
11 … | +sbot links --values --rel root --dest {id} | |
13 | 12 … | ``` |
14 | - | |
15 | - | |
16 | -[→ ssb-links (links2) API](https://github.com/ssbc/ssb-links) |
Built with git-ssb-web