aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/app.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/app.js b/lib/app.js
index 3db24b8..71fd3f0 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -28,6 +28,7 @@ function App(sbot, config) {
var conf = config.patchfoo || {}
this.port = conf.port || 8027
this.host = conf.host || 'localhost'
+ this.filter = conf.filter
var base = conf.base || '/'
this.opts = {
@@ -678,8 +679,9 @@ App.prototype.filterMsg = function (msg, opts, cb) {
var self = this
var myId = self.sbot.id
var author = msg.value && msg.value.author
- var show = (opts.filter !== 'invert')
- if (opts.filter === 'all'
+ var filter = opts.filter || self.filter
+ var show = (filter !== 'invert')
+ if (filter === 'all'
|| author === myId
|| author === opts.feed
|| msg.key === opts.msgId) return cb(null, show)