Don't about in user-feed

This commit is contained in:
Anders Rune Jensen
2018-01-11 16:24:30 +01:00
parent e6bc3b037a
commit 2c29133777
2 changed files with 6 additions and 3 deletions
+2 -1
View File
@@ -185,7 +185,8 @@ exports.init = function (sbot, config) {
function serveFeeds(req, res, following, channelSubscriptions, feedId, name) { function serveFeeds(req, res, following, channelSubscriptions, feedId, name) {
var feedOpts = Object.assign({}, defaultOpts, { var feedOpts = Object.assign({}, defaultOpts, {
renderPrivate: false, renderPrivate: false,
renderSubscribe: false renderSubscribe: false,
renderAbout: false
}) })
pull( pull(
+4 -2
View File
@@ -349,11 +349,13 @@ function docWrite(str) {
} }
function renderMsg(opts, id, msg) { function renderMsg(opts, id, msg) {
var c = msg.value.content || {};
if (opts.renderPrivate == false && typeof(msg.value.content) == 'string') return '' if (opts.renderPrivate == false && typeof(msg.value.content) == 'string') return ''
if (opts.renderSubscribe == false && msg.value.content.type == "channel" && msg.value.content.subscribed != undefined) return '' if (opts.renderSubscribe == false && c.type == "channel" && c.subscribed != undefined) return ''
if (opts.renderAbout == false && c.type == "about") return ''
if (msg.author.publicWebHosting === false) return h('article', 'User has chosen not to be hosted publicly').outerHTML; if (msg.author.publicWebHosting === false) return h('article', 'User has chosen not to be hosted publicly').outerHTML;
var c = msg.value.content || {};
var name = encodeURIComponent(msg.key); var name = encodeURIComponent(msg.key);
return h('article#' + name, return h('article#' + name,
h('header', h('header',