Commit 8127f3c7642cecdccfe264896c26a8cade5df1b6
Use pull-live interface for ssb.links
Charles Lehner committed on 7/10/2016, 1:34:19 AMParent: 198bcc47ef2f962b2651764b7938ffcc875b4cb3
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -86,14 +86,16 @@ | ||
86 | 86 | function getLinks() { |
87 | 87 | var now = Date.now() |
88 | 88 | // compute the result from the past data |
89 | 89 | pull( |
90 | - ssb.links({dest: id, lt: now, reverse: true, values: true}), | |
90 | + ssb.links({dest: id, reverse: true, values: true, | |
91 | + old: true, live: false, sync: false}), | |
91 | 92 | pull.drain(onOldMsg, onOldEnd) |
92 | 93 | ) |
93 | 94 | // keep the results up-to-date in the future |
94 | 95 | pull( |
95 | - ssb.links({dest: id, gte: now, values: true, live: true}), | |
96 | + ssb.links({dest: id, values: true, | |
97 | + old: false, live: true, sync: false}), | |
96 | 98 | pull.drain(onNewMsg, onNewEnd) |
97 | 99 | ) |
98 | 100 | } |
99 | 101 |
Built with git-ssb-web