Commit 98a0c27c7dc3ced9d3093ff713ed4ac3b40bea67
Render room alias messages
Charles E. Lehner committed on 3/31/2022, 8:12:14 PMParent: d80baa241c094e68e1635399ac5019eec9010a71
Files changed
lib/render-msg.js | changed |
lib/render-msg.js | ||
---|---|---|
@@ -394,8 +394,9 @@ | ||
394 | 394 … | case 'cesium_geoPoint.lat': |
395 | 395 … | case 'cesium_geoPoint.lon': return this.astroport(cb) |
396 | 396 … | case 'delete': return this.delete(cb) |
397 | 397 … | case 'patchgraph-update': return this.patchgraphUpdate(cb) |
398 … | + case 'room/alias': return this.roomAlias(cb) | |
398 | 399 … | default: return this.object(cb) |
399 | 400 … | } |
400 | 401 … | } |
401 | 402 … | |
@@ -2612,4 +2613,30 @@ | ||
2612 | 2613 … | h('div', 'patchgraph update:'), |
2613 | 2614 … | self.valueTable(query, 1, function () {}) |
2614 | 2615 … | ]), cb) |
2615 | 2616 … | } |
2617 … | + | |
2618 … | +RenderMsg.prototype.roomAlias = function (cb) { | |
2619 … | + var self = this | |
2620 … | + const url = u.toString(self.c.aliasURL || '') | |
2621 … | + self.link(self.c.room, function (err, roomLink) { | |
2622 … | + return self.wrapMini([ | |
2623 … | + self.c.action === 'registered' ? 'registered' | |
2624 … | + : ('did something with' + (self.c.action ? ' (' + self.c.action + ')' : '')), | |
2625 … | + ' ', | |
2626 … | + self.c.alias ? [ | |
2627 … | + 'room alias ', | |
2628 … | + h('q', u.toString(self.c.alias)), | |
2629 … | + ] : 'a room alias', | |
2630 … | + ' ', | |
2631 … | + self.c.room ? [ | |
2632 … | + 'with room ', | |
2633 … | + roomLink || u.toString(roomLink) | |
2634 … | + ] : '', | |
2635 … | + ' ', | |
2636 … | + url ? [ | |
2637 … | + 'at ', | |
2638 … | + h('a', {href: url}, url) | |
2639 … | + ] : '' | |
2640 … | + ], cb) | |
2641 … | + }) | |
2642 … | +} |
Built with git-ssb-web