From bcd5d6924eb4729b6a85e50c3e91495d0c55d3f6 Mon Sep 17 00:00:00 2001 From: cel Date: Thu, 2 Feb 2017 11:33:17 -0800 Subject: Omit message author from private recipients list Save space by not having the author listed twice --- lib/render-msg.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/render-msg.js b/lib/render-msg.js index 666e5ff..96f3b86 100644 --- a/lib/render-msg.js +++ b/lib/render-msg.js @@ -146,9 +146,12 @@ RenderMsg.prototype.wrapMini = function (content, cb) { } RenderMsg.prototype.recpsLine = function (cb) { - return this.msg.value.private - ? this.render.privateLine(this.c.recps, cb) - : (cb(), '') + if (!this.msg.value.private) return cb(), '' + var author = this.msg.value.author + var recpsNotSelf = u.toArray(this.c.recps).filter(function (link) { + return u.linkDest(link) !== author + }) + return this.render.privateLine(recpsNotSelf, cb) } RenderMsg.prototype.recpsIds = function () { -- cgit v1.2.3