Commit 6f4fd1c5c20e0fe8b69d7c2475f1a5aa3f288442
Reply in branch channel if no root channel
cel committed on 4/29/2017, 3:33:08 AMParent: 6fd99d74f3c5493947f32364d33e7d31669400f2
Files changed
lib/serve.js | changed |
lib/serve.js | |||
---|---|---|---|
@@ -691,14 +691,18 @@ | |||
691 | 691 … | if (err) return self.respond(500, err.stack || err) | |
692 | 692 … | var rootContent = rootMsg && rootMsg.value && rootMsg.value.content | |
693 | 693 … | var recps = rootContent && rootContent.recps | |
694 | 694 … | var threadRootId = rootContent && rootContent.root || id | |
695 | - var channel = rootContent && rootContent.channel | ||
695 … | + var channel | ||
696 | 696 … | ||
697 | 697 … | pull( | |
698 | 698 … | cat([pull.once(rootMsg), self.app.sbot.links({dest: id, values: true})]), | |
699 | 699 … | pull.unique('key'), | |
700 | 700 … | self.app.unboxMessages(), | |
701 … | + pull.through(function (msg) { | ||
702 … | + var c = msg && msg.value.content | ||
703 … | + if (!channel && c.channel) channel = c.channel | ||
704 … | + }), | ||
701 | 705 … | pull.collect(function (err, links) { | |
702 | 706 … | if (err) return self.respond(500, err.stack || err) | |
703 | 707 … | pull( | |
704 | 708 … | pull.values(sort(links)), |
Built with git-ssb-web