aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/render-msg.js6
-rw-r--r--lib/render.js5
-rw-r--r--lib/serve.js2
3 files changed, 9 insertions, 4 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index f351039..89a5f90 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -188,10 +188,12 @@ RenderMsg.prototype.sync = function (cb) {
RenderMsg.prototype.recpsLine = function (cb) {
if (!this.value.private) return cb(), ''
var author = this.value.author
- var recpsNotSelf = u.toArray(this.c.recps).filter(function (link) {
+ var recps = u.toArray(this.c.recps)
+ var recpsNotAuthor = recps.filter(function (link) {
return u.linkDest(link) !== author
})
- return this.render.privateLine(recpsNotSelf, cb)
+ var isAuthorRecp = recpsNotAuthor.length < recps.length
+ return this.render.privateLine(recpsNotAuthor, isAuthorRecp, cb)
}
RenderMsg.prototype.recpsIds = function () {
diff --git a/lib/render.js b/lib/render.js
index a967ee4..0a20b10 100644
--- a/lib/render.js
+++ b/lib/render.js
@@ -307,11 +307,14 @@ Render.prototype.idLink = function (link, cb) {
return a
}
-Render.prototype.privateLine = function (recps, cb) {
+Render.prototype.privateLine = function (recps, isAuthorRecp, cb) {
var done = multicb({pluck: 1, spread: true})
var self = this
var el = h('div.recps',
self.lockIcon(),
+ !isAuthorRecp ? [
+ h('span', {title: 'Author is not a recipient'}, '[!]'), ' '
+ ] : '',
Array.isArray(recps)
? recps.map(function (recp) {
return [' ', self.idLink(recp, done())]
diff --git a/lib/serve.js b/lib/serve.js
index e059f54..2eba468 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -3167,7 +3167,7 @@ Serve.prototype.composer = function (opts, cb) {
h('input', {type: 'hidden', name: 'blobs',
value: JSON.stringify(blobs)}),
h('input', {type: 'hidden', name: 'composer_id', value: opts.id}),
- opts.recps ? self.app.render.privateLine(opts.recps, done()) :
+ opts.recps ? self.app.render.privateLine(opts.recps, true, done()) :
opts.private ? h('div', h('input.recps-input', {name: 'recps',
value: data.recps || '', placeholder: 'recipient ids'})) : '',
channel != null ?