Commit c9ac2432a47d380b558b47e73e078327338b2bca
Keep index of all tags in your network
Josiah Witt committed on 3/15/2018, 12:55:40 AMParent: 61c7de212f2f9e5ff13ceea09919dcb6d3774c27
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -12,9 +12,9 @@ | ||
12 | 12 … | |
13 | 13 … | var initialState = {} |
14 | 14 … | |
15 | 15 … | exports.init = function(ssb, config) { |
16 | - return ssb._flumeUse('tags', FlumeReduce('test', reduce, map, null, initialState)) | |
16 … | + return ssb._flumeUse('tags', FlumeReduce(1, reduce, map, null, initialState)) | |
17 | 17 … | |
18 | 18 … | function reduce(result, item) { |
19 | 19 … | if (!item) return result |
20 | 20 … | |
@@ -46,11 +46,8 @@ | ||
46 | 46 … | return result |
47 | 47 … | } |
48 | 48 … | |
49 | 49 … | function map(msg) { |
50 | - // only include your own tags (for now) | |
51 | - if (msg.value.author !== ssb.id) return | |
52 | - | |
53 | 50 … | // unbox private message |
54 | 51 … | if (msg.value.content === 'string') { |
55 | 52 … | // unbox private message (requires ssb-private plugin) |
56 | 53 … | msg = ssb.private.unbox(msg) |
Built with git-ssb-web