diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-04-09 22:59:31 -0700 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-04-09 22:59:31 -0700 |
commit | 96ec518afcac5c2253635db6ad9286f6a72e4824 (patch) | |
tree | 5a0ded2c003237d24a68a2fe63e263649862df79 /lib | |
parent | a9e1b1309bbe24128ae26e9d3389d2c0ff2456ef (diff) | |
download | patchfoo-96ec518afcac5c2253635db6ad9286f6a72e4824.tar.gz patchfoo-96ec518afcac5c2253635db6ad9286f6a72e4824.zip |
Add composer to New page
Diffstat (limited to 'lib')
-rw-r--r-- | lib/serve.js | 31 |
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) { |