Commit b7c122f32a21918d997f6a13cc0d2e51f3ab4bcc
render follow/unfollow messages
Ev Bogue committed on 6/14/2018, 7:01:52 PMParent: 45e59d3471f3beeee49304361c2c16c9fc3c819f
Files changed
render.js | changed |
render.js | ||
---|---|---|
@@ -29,8 +29,22 @@ | ||
29 | 29 | var privateMsg = h('span', ' ', h('img.emoji', {src: config.emojiUrl + 'lock.png'}), ' ', h('button.btn', 'Open')) |
30 | 30 | message.appendChild(tools.mini(msg, privateMsg)) |
31 | 31 | return message |
32 | 32 | }*/ |
33 | + else if (msg.value.content.type == 'contact') { | |
34 | + console.log(msg) | |
35 | + if (msg.value.content.following == true) { | |
36 | + var following = h('span', ' follows ', h('a', {href: '#' + msg.value.content.contact}, avatar.name(msg.value.content.contact))) | |
37 | + message.appendChild(tools.mini(msg, following)) | |
38 | + } | |
39 | + | |
40 | + if (msg.value.content.following == false) { | |
41 | + var unfollowing = h('span', ' unfollows ', h('a', {href: '#' + msg.value.content.contact}, avatar.name(msg.value.content.contact))) | |
42 | + message.appendChild(tools.mini(msg, unfollowing)) | |
43 | + } | |
44 | + return message | |
45 | + } | |
46 | + | |
33 | 47 | else if (msg.value.content.type == 'git-update') { |
34 | 48 | |
35 | 49 | message.appendChild(tools.header(msg)) |
36 | 50 |
Built with git-ssb-web