git ssb

16+

cel / patchfoo



Commit 6f4fd1c5c20e0fe8b69d7c2475f1a5aa3f288442

Reply in branch channel if no root channel

cel committed on 4/29/2017, 3:33:08 AM
Parent: 6fd99d74f3c5493947f32364d33e7d31669400f2

Files changed

lib/serve.jschanged
lib/serve.jsView
@@ -691,14 +691,18 @@
691691 if (err) return self.respond(500, err.stack || err)
692692 var rootContent = rootMsg && rootMsg.value && rootMsg.value.content
693693 var recps = rootContent && rootContent.recps
694694 var threadRootId = rootContent && rootContent.root || id
695- var channel = rootContent && rootContent.channel
695 + var channel
696696
697697 pull(
698698 cat([pull.once(rootMsg), self.app.sbot.links({dest: id, values: true})]),
699699 pull.unique('key'),
700700 self.app.unboxMessages(),
701 + pull.through(function (msg) {
702 + var c = msg && msg.value.content
703 + if (!channel && c.channel) channel = c.channel
704 + }),
701705 pull.collect(function (err, links) {
702706 if (err) return self.respond(500, err.stack || err)
703707 pull(
704708 pull.values(sort(links)),

Built with git-ssb-web