aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-04-09 22:59:31 -0700
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-04-09 22:59:31 -0700
commit96ec518afcac5c2253635db6ad9286f6a72e4824 (patch)
tree5a0ded2c003237d24a68a2fe63e263649862df79 /lib
parenta9e1b1309bbe24128ae26e9d3389d2c0ff2456ef (diff)
downloadpatchfoo-96ec518afcac5c2253635db6ad9286f6a72e4824.tar.gz
patchfoo-96ec518afcac5c2253635db6ad9286f6a72e4824.zip
Add composer to New page
Diffstat (limited to 'lib')
-rw-r--r--lib/serve.js31
1 files changed, 19 insertions, 12 deletions
diff --git a/lib/serve.js b/lib/serve.js
index 32932c5..99755c0 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -879,18 +879,25 @@ Serve.prototype.wrapThread = function (opts) {
}
Serve.prototype.wrapNew = function (opts) {
- return function (read) {
- return cat([
- read,
- pull.once(
- h('tr', h('td.paginate', {colspan: 3},
- h('a', {href: '?' + qs.stringify({
- gt: opts.gt
- })}, '↓ catchup')
- )).outerHTML
- )
- ])
- }
+ var self = this
+ return u.hyperwrap(function (thread, cb) {
+ self.composer({
+ channel: '',
+ }, function (err, composer) {
+ if (err) return cb(err)
+ cb(null, [
+ composer,
+ h('table.ssb-msgs',
+ thread,
+ h('tr', h('td.paginate', {colspan: 3},
+ h('a', {href: '?' + qs.stringify({
+ gt: opts.gt
+ })}, '↓ catchup')
+ ))
+ )
+ ])
+ })
+ })
}
Serve.prototype.wrapChannel = function (channel) {