Commit 1b01f50b7c8883c3a38c450b0497d3c57fd81167
handle contact messages more with the intent of patchwork
Dominic Tarr committed on 7/25/2016, 8:43:06 PMParent: ca58f0e7a14d980e607b0d0886ec4b0ef76b9dc1
Files changed
modules/follow.js | changed |
modules/follow.js | ||
---|---|---|
@@ -13,15 +13,11 @@ | ||
13 | 13 | exports.message_content = function (msg) { |
14 | 14 | |
15 | 15 | var content = msg.value.content |
16 | 16 | if(content.type == 'contact' && content.contact) { |
17 | - var relation = content.following ? 'follows' : 'unfollows' | |
18 | - return h('div.contact', [ | |
19 | - isRelated(content.following, 'follows'), | |
20 | - isRelated(content.blocking, 'blocks') | |
21 | - ].filter(Boolean).join(' and ') | |
22 | - , avatar(msg.value.content.contact, 'thumbnail') | |
23 | - ) | |
17 | + var relation = isRelated(content.following, 'follows') | |
18 | + if(content.blocking) relation = 'blocks' | |
19 | + return h('div.contact', relation, avatar(msg.value.content.contact, 'thumbnail')) | |
24 | 20 | } |
25 | 21 | } |
26 | 22 | |
27 | 23 | var sbot_links2 = plugs.first(exports.sbot_links2 = []) |
@@ -103,4 +99,12 @@ | ||
103 | 99 | |
104 | 100 | |
105 | 101 | |
106 | 102 | |
103 | + | |
104 | + | |
105 | + | |
106 | + | |
107 | + | |
108 | + | |
109 | + | |
110 | + |
Built with git-ssb-web