Commit 697e3e1780dfe42cdc94d4e26e2788489ddfb896
Render private messages in public views
cel committed on 11/29/2016, 4:26:26 PMParent: 931ac024cad9b0e63311dd1a76de77d0490f8391
Files changed
modules_basic/private.js | changed |
style.css | changed |
modules_basic/private.js | ||
---|---|---|
@@ -11,8 +11,9 @@ | ||
11 | 11 … | var message_unbox = plugs.first(exports.message_unbox = []) |
12 | 12 … | var sbot_log = plugs.first(exports.sbot_log = []) |
13 | 13 … | var sbot_whoami = plugs.first(exports.sbot_whoami = []) |
14 | 14 … | var avatar_image_link = plugs.first(exports.avatar_image_link = []) |
15 … | +var emoji_url = plugs.first(exports.emoji_url = []) | |
15 | 16 … | |
16 | 17 … | function unbox () { |
17 | 18 … | return pull( |
18 | 19 … | pull.filter(function (msg) { |
@@ -90,7 +91,15 @@ | ||
90 | 91 … | return avatar_image_link('string' == typeof id ? id : id.link, 'thumbnail') |
91 | 92 … | })) |
92 | 93 … | } |
93 | 94 … | |
95 … | +exports.message_content_mini = function (msg, sbot) { | |
96 … | + if (typeof msg.value.content === 'string') { | |
97 … | + var icon = emoji_url('lock') | |
98 … | + return icon | |
99 … | + ? h('img', {className: 'emoji', src: icon}) | |
100 … | + : 'PRIVATE' | |
101 … | + } | |
102 … | +} | |
94 | 103 … | |
95 | 104 … | |
96 | 105 … |
Built with git-ssb-web