aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/serve.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/serve.js b/lib/serve.js
index f8d9cf1..d739659 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -819,6 +819,7 @@ Serve.prototype.composer = function (opts, cb) {
if (data.blob_type && blobs[data.blob_link]) {
blobs[data.blob_link].type = data.blob_type
}
+ var channel = data.channel != null ? data.channel : opts.channel
var done = multicb({pluck: 1, spread: true})
done()(null, h('section.composer',
@@ -829,9 +830,9 @@ Serve.prototype.composer = function (opts, cb) {
opts.recps ? self.app.render.privateLine(opts.recps, done()) :
opts.private ? h('div', h('input.recps-input', {name: 'recps',
value: data.recps || '', placeholder: 'recipient ids'})) : '',
- data.channel || opts.channel != null ?
+ channel != null ?
h('div', '#', h('input', {name: 'channel', placeholder: 'channel',
- value: data.channel || opts.channel || ''})) : '',
+ value: channel})) : '',
h('textarea', {
id: opts.id,
name: 'text',
@@ -899,7 +900,7 @@ Serve.prototype.composer = function (opts, cb) {
}
if (opts.root) content.root = opts.root
if (opts.branches) content.branch = u.fromArray(opts.branches)
- if (data.channel) content.channel = data.channel
+ if (channel) content.channel = data.channel
}
var msg = {
value: {