diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2018-08-12 16:50:47 -0700 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2018-08-12 16:50:47 -0700 |
commit | 2e87d6f2847b51ee3828ea6fe18df2ebaf4957d3 (patch) | |
tree | a975eed5bae115e650a512f7453e426c53fe6ba5 /lib/render-msg.js | |
parent | 151b874555bc8a196a359921f7e4ea7558e277f6 (diff) | |
download | patchfoo-2e87d6f2847b51ee3828ea6fe18df2ebaf4957d3.tar.gz patchfoo-2e87d6f2847b51ee3828ea6fe18df2ebaf4957d3.zip |
Show if private message author is not a recipient
Diffstat (limited to 'lib/render-msg.js')
-rw-r--r-- | lib/render-msg.js | 6 |
1 files changed, 4 insertions, 2 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 () { |