From 00fd240fdb1fc733f604bcdfe82032791458efb2 Mon Sep 17 00:00:00 2001 From: cel Date: Sun, 17 May 2020 14:13:53 -0400 Subject: Render astroport messages --- lib/render-msg.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/render-msg.js') 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) +} -- cgit v1.2.3