From 96ec518afcac5c2253635db6ad9286f6a72e4824 Mon Sep 17 00:00:00 2001 From: cel Date: Sun, 9 Apr 2017 22:59:31 -0700 Subject: Add composer to New page --- lib/serve.js | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'lib') 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) { -- cgit v1.2.3