Default to require opt-in for publicWebHosting

This commit is contained in:
cel
2018-08-17 15:32:42 -07:00
parent ba6d7cd3ab
commit 7123fbcab1
3 changed files with 7 additions and 2 deletions
+2 -1
View File
@@ -114,7 +114,7 @@ function toolTipTop() {
}
function renderAbout(opts, about, showAllHTML = "") {
if (about.publicWebHosting === false) {
if (about.publicWebHosting === false || (about.publicWebHosting == null && opts.requireOptIn)) {
return pull(
pull.map(renderMsg.bind(this, opts, '')),
wrap(toolTipTop() + '<main>', '</main>' + callToAction())
@@ -362,6 +362,7 @@ function renderMsg(opts, id, msg) {
if (opts.renderAbout == false && c.type == "about") return ''
if (opts.renderPub == false && c.type == "pub") return ''
if (msg.author.publicWebHosting === false) return h('article', 'User has chosen not to be hosted publicly').outerHTML;
if (msg.author.publicWebHosting == null && opts.requireOptIn) return h('article', 'User has not chosen to be hosted publicly').outerHTML;
var name = encodeURIComponent(msg.key);
return h('article#' + name,