Commit d6c90ba12886129623834c81dfcd6e02e6ec8d5d
render about messages
Ev Bogue committed on 2/14/2019, 1:44:36 AMParent: 1d62af50d0e39034f4d142cc41f0e948dfa0274b
Files changed
render.js | changed |
render.js | ||
---|---|---|
@@ -33,8 +33,30 @@ | ||
33 | 33 | message.appendChild(tools.mini(msg, muted)) |
34 | 34 | return message |
35 | 35 | } |
36 | 36 | |
37 | + else if (msg.value.content.type == 'about') { | |
38 | + if (msg.value.content.image) { | |
39 | + var image = h('span.avatar--small', | |
40 | + ' identified ', | |
41 | + h('a', {href: '#' + msg.value.content.about}, avatar.cachedName(msg.value.content.about)), | |
42 | + ' as ', | |
43 | + h('img', {src: config.blobsUrl + msg.value.content.image.link}) | |
44 | + ) | |
45 | + message.appendChild(tools.mini(msg, image)) | |
46 | + } | |
47 | + if (msg.value.content.name) { | |
48 | + var name = h('span', | |
49 | + ' identified ', | |
50 | + h('a', {href: '#' + msg.value.content.about}, avatar.cachedName(msg.value.content.about)), | |
51 | + ' as ', msg.value.content.name | |
52 | + ) | |
53 | + message.appendChild(tools.mini(msg, name)) | |
54 | + } | |
55 | + | |
56 | + return message | |
57 | + } | |
58 | + | |
37 | 59 | else if (msg.value.content.type == 'label'){ |
38 | 60 | var content = h('span', ' labeled ', tools.messageLink(msg.value.content.link), ' as ', h('mark', h('a', {href: '/#label/' + msg.value.content.label}, msg.value.content.label))) |
39 | 61 | message.appendChild(tools.mini(msg, content)) |
40 | 62 | return message |
Built with git-ssb-web