Commit 4c0cff0c752220149c75dae5540323be22904774
render block/unblock messages
Ev Bogue committed on 6/26/2018, 12:05:45 AMParent: c27b5b1b731a18ff6deecf4f4472f41f25a81f20
Files changed
render.js | changed |
render.js | ||
---|---|---|
@@ -24,17 +24,25 @@ | ||
24 | 24 | return message |
25 | 25 | } |
26 | 26 | |
27 | 27 | else if (msg.value.content.type == 'contact') { |
28 | + var contact = h('a', {href: '#' + msg.value.content.contact}, avatar.name(msg.value.content.contact)) | |
28 | 29 | if (msg.value.content.following == true) { |
29 | - var following = h('span', ' follows ', h('a', {href: '#' + msg.value.content.contact}, avatar.name(msg.value.content.contact))) | |
30 | + var following = h('span', ' follows ', contact) | |
30 | 31 | message.appendChild(tools.mini(msg, following)) |
31 | 32 | } |
32 | - | |
33 | 33 | if (msg.value.content.following == false) { |
34 | - var unfollowing = h('span', ' unfollows ', h('a', {href: '#' + msg.value.content.contact}, avatar.name(msg.value.content.contact))) | |
34 | + var unfollowing = h('span', ' unfollows ', contact) | |
35 | 35 | message.appendChild(tools.mini(msg, unfollowing)) |
36 | 36 | } |
37 | + if (msg.value.content.blocking == true) { | |
38 | + var blocking = h('span', ' blocks ', contact) | |
39 | + message.appendChild(tools.mini(msg, blocking)) | |
40 | + } | |
41 | + if (msg.value.content.blocking == false) { | |
42 | + var unblocking = h('span', ' unblocks ', contact) | |
43 | + message.appendChild(tools.mini(msg, unblocking)) | |
44 | + } | |
37 | 45 | return message |
38 | 46 | } |
39 | 47 | |
40 | 48 | else if (msg.value.content.type == 'git-update') { |
Built with git-ssb-web