aboutsummaryrefslogtreecommitdiff
path: root/lib/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/app.js')
-rw-r--r--lib/app.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/app.js b/lib/app.js
index b49b378..fb27e78 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -1102,3 +1102,15 @@ App.prototype.getShard = function (id, cb) {
})
})
}
+
+App.prototype.sbotStatus = function (cb) {
+ /* sbot.status is a "sync" method. if we are a plugin, it is sync. if we are
+ * calling over muxrpc, it is async. */
+ var status
+ try {
+ status = this.sbot.status(cb)
+ } catch(err) {
+ return cb(err)
+ }
+ if (typeof status === 'object' && status !== null) return cb(null, status)
+}