aboutsummaryrefslogtreecommitdiff
path: root/lib/render-msg.js
diff options
context:
space:
mode:
authorcel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519>2020-03-25 14:41:17 -0400
committercel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519>2020-03-28 13:55:47 -0400
commitb5bd144e5f96aa2d43f0f8d60e6896c7426fcc74 (patch)
treeafcab2dadae13913fc42c13722f632b3900f0c22 /lib/render-msg.js
parentd752aa18fb34928491e308a85286101b9f6e35e1 (diff)
downloadpatchfoo-b5bd144e5f96aa2d43f0f8d60e6896c7426fcc74.tar.gz
patchfoo-b5bd144e5f96aa2d43f0f8d60e6896c7426fcc74.zip
Render names of some message types better
Diffstat (limited to 'lib/render-msg.js')
-rw-r--r--lib/render-msg.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index 3a55a3b..6cc9f24 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -528,6 +528,12 @@ RenderMsg.prototype.title = function (cb) {
})
}
+var autoTypes = {
+ 'gathering': true,
+ 'tag': true,
+ 'git-repo': true
+}
+
RenderMsg.prototype.title1 = function (cb) {
var self = this
if (!self.c || typeof self.c !== 'object') {
@@ -562,6 +568,7 @@ RenderMsg.prototype.title1 = function (cb) {
if (err) return cb(err)
var name = about.name || about.title
|| (about.description && mdInline(about.description))
+ || (self.c.type in autoTypes || Object.keys(self.c).length === 1 ? self.c.type : null)
if (name) return cb(null, u.truncate(name, 72))
self.message(function (err, el) {
if (err) return cb(err)