diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2018-11-18 20:00:21 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2018-11-18 20:00:21 -1000 |
commit | 731d0e8aa243bfcd9de8fcea3fd3cdd3d64bde14 (patch) | |
tree | 3704539244c33adebfa3e894a405ae529372c2b4 /lib/app.js | |
parent | 58cd6d811c22ab2eba24513595e176ecc91fad28 (diff) | |
download | patchfoo-731d0e8aa243bfcd9de8fcea3fd3cdd3d64bde14.tar.gz patchfoo-731d0e8aa243bfcd9de8fcea3fd3cdd3d64bde14.zip |
Fix status page
Diffstat (limited to 'lib/app.js')
-rw-r--r-- | lib/app.js | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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) +} |