aboutsummaryrefslogtreecommitdiff
path: root/lib/app.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-11-18 20:00:21 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-11-18 20:00:21 -1000
commit731d0e8aa243bfcd9de8fcea3fd3cdd3d64bde14 (patch)
tree3704539244c33adebfa3e894a405ae529372c2b4 /lib/app.js
parent58cd6d811c22ab2eba24513595e176ecc91fad28 (diff)
downloadpatchfoo-731d0e8aa243bfcd9de8fcea3fd3cdd3d64bde14.tar.gz
patchfoo-731d0e8aa243bfcd9de8fcea3fd3cdd3d64bde14.zip
Fix status page
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)
+}