git ssb

9+

cel / ssb-viewer



Commit 2c291337776846d8c4edf05609c74fac530254e6

Don't about in user-feed

Anders Rune Jensen committed on 1/11/2018, 3:24:30 PM
Parent: e6bc3b037ac455d656641e9e03e1ccba0a440ea0

Files changed

index.jschanged
render.jschanged
index.jsView
@@ -184,9 +184,10 @@
184184
185185 function serveFeeds(req, res, following, channelSubscriptions, feedId, name) {
186186 var feedOpts = Object.assign({}, defaultOpts, {
187187 renderPrivate: false,
188- renderSubscribe: false
188 + renderSubscribe: false,
189 + renderAbout: false
189190 })
190191
191192 pull(
192193 sbot.createLogStream({ reverse: true, limit: 5000 }),
render.jsView
@@ -348,13 +348,15 @@
348348 return "document.write(" + JSON.stringify(str) + ")\n";
349349 }
350350
351351 function renderMsg(opts, id, msg) {
352 + var c = msg.value.content || {};
353 +
352354 if (opts.renderPrivate == false && typeof(msg.value.content) == 'string') return ''
353- if (opts.renderSubscribe == false && msg.value.content.type == "channel" && msg.value.content.subscribed != undefined) return ''
355 + if (opts.renderSubscribe == false && c.type == "channel" && c.subscribed != undefined) return ''
356 + if (opts.renderAbout == false && c.type == "about") return ''
354357 if (msg.author.publicWebHosting === false) return h('article', 'User has chosen not to be hosted publicly').outerHTML;
355358
356- var c = msg.value.content || {};
357359 var name = encodeURIComponent(msg.key);
358360 return h('article#' + name,
359361 h('header',
360362 h('figure',

Built with git-ssb-web