git ssb

1+

punkmonk.termux / mvd



forked from ev / mvd

Commit 4c0cff0c752220149c75dae5540323be22904774

render block/unblock messages

Ev Bogue committed on 6/26/2018, 12:05:45 AM
Parent: c27b5b1b731a18ff6deecf4f4472f41f25a81f20

Files changed

render.jschanged
render.jsView
@@ -24,17 +24,25 @@
2424 return message
2525 }
2626
2727 else if (msg.value.content.type == 'contact') {
28+ var contact = h('a', {href: '#' + msg.value.content.contact}, avatar.name(msg.value.content.contact))
2829 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)
3031 message.appendChild(tools.mini(msg, following))
3132 }
32-
3333 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)
3535 message.appendChild(tools.mini(msg, unfollowing))
3636 }
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+ }
3745 return message
3846 }
3947
4048 else if (msg.value.content.type == 'git-update') {

Built with git-ssb-web