Commit 0e117cb0764da51e8391cf16bbc2847d828a3631
oops, syntax error
Dominic Tarr committed on 7/20/2017, 10:28:51 AMParent: 0af731944b36c4896f401bf8a54712680ef63ce7
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -8,8 +8,19 @@ | ||
8 | 8 … | //load current state |
9 | 9 … | var state = ssb.init(sbot, process.argv[2] || sbot.id, next) |
10 | 10 … | var irc = IRC(config, next) |
11 | 11 … | |
12 … | + | |
13 … | + function notify (note) { | |
14 … | + irc.say( | |
15 … | + note.type == 'channel' | |
16 … | + ? IRC.toChannel(note.target) | |
17 … | + : note.target | |
18 … | + , | |
19 … | + ssb.render(note, ssb.link(note.id, config)) | |
20 … | + ) | |
21 … | + } | |
22 … | + | |
12 | 23 … | function next (err, state) { |
13 | 24 … | if(--n) return |
14 | 25 … | //XXX: properly persist state with a flumeview? |
15 | 26 … | |
@@ -22,18 +33,8 @@ | ||
22 | 33 … | //only notify about live posts. |
23 | 34 … | //this may cut out if the connection to IRC drops |
24 | 35 … | //though, since |
25 | 36 … | |
26 | - function notify (note) { | |
27 | - irc.say( | |
28 | - note.type == 'channel' | |
29 | - ? IRC.toChannel(note.target) | |
30 | - : note.target | |
31 | - , | |
32 | - ssb.render(note, ssb.link(note.id, config)) | |
33 | - ) | |
34 | - } | |
35 | - | |
36 | 37 … | pull( |
37 | 38 … | sbot.createLogStream({live: true}), |
38 | 39 … | pull.drain(function (msg) { |
39 | 40 … | if(msg.sync) return |
@@ -44,8 +45,8 @@ | ||
44 | 45 … | if(a.length) |
45 | 46 … | a.forEach(notify) |
46 | 47 … | }) |
47 | 48 … | ) |
48 | - }) | |
49 … | + } | |
49 | 50 … | } |
50 | 51 … | |
51 | 52 … |
Built with git-ssb-web