aboutsummaryrefslogtreecommitdiff
path: root/lib/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/app.js')
-rw-r--r--lib/app.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/app.js b/lib/app.js
index de8585d..a7533ce 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -3,6 +3,7 @@ var memo = require('asyncmemo')
var lru = require('lrucache')
var pkg = require('../package')
var u = require('./util')
+var pull = require('pull-stream')
var Serve = require('./serve')
var Render = require('./render')
@@ -74,7 +75,9 @@ App.prototype.unboxMsg = function (msg, cb) {
}
App.prototype.search = function (opts) {
- return this.sbot.fulltext.search(opts)
+ var search = this.sbot.fulltext && this.sbot.fulltext.search
+ if (!search) return pull.error(new Error('Missing fulltext search plugin'))
+ return search(opts)
}
App.prototype.getMsgDecrypted = function (key, cb) {