aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519>2020-05-17 14:13:53 -0400
committercel <cel@lOUVT+Phkvai9a/cCS/RKo+S9hnPAQdVixms/7ldpPA=.ed25519>2020-05-17 14:13:53 -0400
commit00fd240fdb1fc733f604bcdfe82032791458efb2 (patch)
tree8ea11c5eed1f57578490e54150a66d507ca29f07
parentd19e131248105a3639e7a03f41d023c38b77ec30 (diff)
downloadpatchfoo-00fd240fdb1fc733f604bcdfe82032791458efb2.tar.gz
patchfoo-00fd240fdb1fc733f604bcdfe82032791458efb2.zip
Render astroport messages
-rw-r--r--lib/render-msg.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index a9040ee..4a549b2 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -387,6 +387,10 @@ RenderMsg.prototype.message = function (cb) {
case 'peer-invite': return this.peerInvite(cb)
case 'peer-invite/confirm': return this.peerInviteConfirm(cb)
case 'peer-invite/accept': return this.peerInviteAccept(cb)
+ case 'ipfsnodeid':
+ case 'ipfstryme':
+ case 'cesium_geoPoint.lat':
+ case 'cesium_geoPoint.lon': return this.astroport(cb)
default: return this.object(cb)
}
}
@@ -2487,3 +2491,14 @@ RenderMsg.prototype.igoPlayMove = function (value, cb) {
cb(err, table)
})
}
+
+RenderMsg.prototype.astroport = function (cb) {
+ this.wrapMini([
+ this.c.type === 'cesium_geoPoint.lat' ? 'Latitude' :
+ this.c.type === 'cesium_geoPoint.lon' ? 'Longitude' :
+ this.c.type === 'ipfsnodeid' ? 'IPFS node id' :
+ this.c.type === 'ipfstryme' ? 'IPFS address' :
+ this.c.type, ' ',
+ h('code', u.toString(this.c.text))
+ ], cb)
+}