Commit 454dc73d98065ea261663450ba6c7433954706bd
filter broken about messages from being rendered
Matt McKegg committed on 3/27/2017, 3:14:44 AMParent: 02c37f2952d1e4ff2fea0f375f266d29e1b8c915
Files changed
plugs/message/html/render/about.js | changed |
plugs/message/html/render/about.js | ||
---|---|---|
@@ -1,8 +1,9 @@ | ||
1 | 1 | var h = require('mutant/h') |
2 | 2 | var computed = require('mutant/computed') |
3 | 3 | var nest = require('depnest') |
4 | 4 | var extend = require('xtend') |
5 | +var ref = require('ssb-ref') | |
5 | 6 | |
6 | 7 | exports.needs = nest({ |
7 | 8 | 'message.html': { |
8 | 9 | decorate: 'reduce', |
@@ -19,9 +20,9 @@ | ||
19 | 20 | |
20 | 21 | exports.create = function (api) { |
21 | 22 | return nest('message.html.render', function about (msg, opts) { |
22 | 23 | if (msg.value.content.type !== 'about') return |
23 | - if (!msg.value.content.about) return | |
24 | + if (!ref.isFeed(msg.value.content.about)) return | |
24 | 25 | |
25 | 26 | var c = msg.value.content |
26 | 27 | var self = msg.value.author === c.about |
27 | 28 | var content = [] |
Built with git-ssb-web