git ssb

0+

Dominic / ssb-irc



Commit 0e117cb0764da51e8391cf16bbc2847d828a3631

oops, syntax error

Dominic Tarr committed on 7/20/2017, 10:28:51 AM
Parent: 0af731944b36c4896f401bf8a54712680ef63ce7

Files changed

index.jschanged
index.jsView
@@ -8,8 +8,19 @@
88 //load current state
99 var state = ssb.init(sbot, process.argv[2] || sbot.id, next)
1010 var irc = IRC(config, next)
1111
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 +
1223 function next (err, state) {
1324 if(--n) return
1425 //XXX: properly persist state with a flumeview?
1526
@@ -22,18 +33,8 @@
2233 //only notify about live posts.
2334 //this may cut out if the connection to IRC drops
2435 //though, since
2536
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-
3637 pull(
3738 sbot.createLogStream({live: true}),
3839 pull.drain(function (msg) {
3940 if(msg.sync) return
@@ -44,8 +45,8 @@
4445 if(a.length)
4546 a.forEach(notify)
4647 })
4748 )
48- })
49 + }
4950 }
5051
5152

Built with git-ssb-web